mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
route: Fix flush w/o specified address family
PR: 291867
Reported by: gavin
Reviewed by: pouria, melifaro
Sponsored by: The FreeBSD Foundation
Fixes: c597432e22 ("route(8): convert to netlink")
Differential Revision: https://reviews.freebsd.org/D57336
This commit is contained in:
@@ -950,7 +950,8 @@ flushroutes_fib_nl(int fib, int af)
|
|||||||
struct snl_msg_info attrs = {};
|
struct snl_msg_info attrs = {};
|
||||||
print_nlmsg(&h, hdr, &attrs);
|
print_nlmsg(&h, hdr, &attrs);
|
||||||
}
|
}
|
||||||
if (r.rta_table != (uint32_t)fib || r.rtm_family != af)
|
if (r.rta_table != (uint32_t)fib ||
|
||||||
|
(af != AF_UNSPEC && r.rtm_family != af))
|
||||||
continue;
|
continue;
|
||||||
if ((r.rta_rtflags & RTF_GATEWAY) == 0)
|
if ((r.rta_rtflags & RTF_GATEWAY) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user