Hi, "route flush" now does nothing. "route -4 flush" and "route -6 flush" both work individually, but "route flush" (which according to the man page should still flush all routes) fails silently. Compare the (sanitised) verbose output from "route -v flush" and "route -6v flush" on the same machine, one deletes the requested routes, and the other does nothing. # route -v flush 23:25:49.505 PID 0 add/repl route 0.0.0.0/0 gw 192.168.XXX.1 iface em0 mtu 1500 table inet.0 23:25:49.506 PID 0 add/repl route 127.0.0.1/32 iface lo0 mtu 16384 table inet.0 23:25:49.506 PID 0 add/repl route 192.168.XXX.0/24 iface em0 mtu 1500 table inet.0 23:25:49.506 PID 0 add/repl route 192.168.XXX.136/32 iface lo0 mtu 16384 table inet.0 23:25:49.506 PID 0 add/repl route ::/96 prohibit(reject) 23:25:49.506 PID 0 add/repl route ::/0 gw fe80::7642:7fff:fe21:XXXX%em0 iface em0 mtu 1500 table inet6.0 23:25:49.507 PID 0 add/repl route ::1/128 iface lo0 mtu 16384 table inet6.0 23:25:49.507 PID 0 add/repl route ::ffff:0.0.0.0/96 prohibit(reject) 23:25:49.507 PID 0 add/repl route 2a02:XXXX:XXXX::/64 iface em0 mtu 1500 table inet6.0 23:25:49.507 PID 0 add/repl route 2a02:XXXX:XXXX:0:4aea:62ff:feXX:XXXX/128 iface lo0 mtu 16384 table inet6.0 23:25:49.507 PID 0 add/repl route fd34:2889:c9b8::/64 iface em0 mtu 1500 table inet6.0 23:25:49.507 PID 0 add/repl route fd34:2889:c9b8:0:4aea:62ff:feXX:XXXX/128 iface lo0 mtu 16384 table inet6.0 23:25:49.507 PID 0 add/repl route fe80::%lo0/10 prohibit(reject) 23:25:49.507 PID 0 add/repl route fe80::%em0/64 iface em0 mtu 1500 table inet6.0 23:25:49.508 PID 0 add/repl route fe80::4aea:62ff:feXX:XXXX%lo0/128 iface lo0 mtu 16384 table inet6.0 23:25:49.508 PID 0 add/repl route fe80::%lo0/64 iface lo0 mtu 16384 table inet6.0 23:25:49.508 PID 0 add/repl route fe80::1%lo0/128 iface lo0 mtu 16384 table inet6.0 23:25:49.508 PID 0 add/repl route ff02::/16 prohibit(reject) # route -6v flush 23:25:52.692 PID 0 add/repl route ::/96 prohibit(reject) 23:25:52.693 PID 0 add/repl route ::/0 gw fe80::7642:7fff:fe21:XXXX%em0 iface em0 mtu 1500 table inet6.0 23:25:52.693 PID 0 delete route ::/0 table inet6.0 23:25:52.693 PID 0 add/repl route ::1/128 iface lo0 mtu 16384 table inet6.0 23:25:52.693 PID 0 add/repl route ::ffff:0.0.0.0/96 prohibit(reject) 23:25:52.693 PID 0 add/repl route 2a02:XXXX:XXXX::/64 iface em0 mtu 1500 table inet6.0 23:25:52.693 PID 0 add/repl route 2a02:XXXX:XXXX:0:4aea:62ff:fe38:8940/128 iface lo0 mtu 16384 table inet6.0 23:25:52.693 PID 0 add/repl route fd34:2889:c9b8::/64 iface em0 mtu 1500 table inet6.0 23:25:52.694 PID 0 add/repl route fd34:2889:c9b8:0:4aea:62ff:feXX:XXXX/128 iface lo0 mtu 16384 table inet6.0 23:25:52.694 PID 0 add/repl route fe80::%lo0/10 prohibit(reject) 23:25:52.694 PID 0 add/repl route fe80::%em0/64 iface em0 mtu 1500 table inet6.0 23:25:52.694 PID 0 add/repl route fe80::4aea:62ff:feXX:XXXX%lo0/128 iface lo0 mtu 16384 table inet6.0 23:25:52.694 PID 0 add/repl route fe80::%lo0/64 iface lo0 mtu 16384 table inet6.0 23:25:52.694 PID 0 add/repl route fe80::1%lo0/128 iface lo0 mtu 16384 table inet6.0 23:25:52.694 PID 0 add/repl route ff02::/16 prohibit(reject) This seems to have been caused by the Netlink changes, presumably flushroutes_fib_nl() needs to iterate over the address families to match the old AF_UNSPEC behaviour. Thanks, Gavin
Can you give the patch in https://reviews.freebsd.org/D57336 a try?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=32a7ba251acbfb442665eed40fb4f48c8f2bd710 commit 32a7ba251acbfb442665eed40fb4f48c8f2bd710 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2026-05-29 16:44:09 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2026-05-29 22:18:20 +0000 route: Fix `flush` w/o specified address family PR: 291867 Reported by: gavin Reviewed by: pouria, melifaro Sponsored by: The FreeBSD Foundation Fixes: c597432e2297 ("route(8): convert to netlink") Differential Revision: https://reviews.freebsd.org/D57336 sbin/route/route_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2caaf8c1c717bcebf14832b4bea5766e393ad683 commit 2caaf8c1c717bcebf14832b4bea5766e393ad683 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2026-05-29 16:44:09 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2026-06-09 13:02:22 +0000 route: Fix `flush` w/o specified address family PR: 291867 Reported by: gavin Reviewed by: pouria, melifaro Sponsored by: The FreeBSD Foundation Fixes: c597432e2297 ("route(8): convert to netlink") Differential Revision: https://reviews.freebsd.org/D57336 (cherry picked from commit 32a7ba251acbfb442665eed40fb4f48c8f2bd710) sbin/route/route_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)