mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01: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:
1 parent
b5dce0ae4f
commit
32a7ba251a
1 file changed
+2
-1
@@ -950,7 +950,8 @@ flushroutes_fib_nl(int fib, int af)
|
||||
struct snl_msg_info 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;
|
||||
if ((r.rta_rtflags & RTF_GATEWAY) == 0)
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user