1
0
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:
Ed Maste
2026-05-29 12:44:09 -04:00
parent b5dce0ae4f
commit 32a7ba251a
+2 -1
View File
@@ -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;