Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 2025 23:42:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 291867] route(8): "route flush" does nothing since netlink changes
Message-ID:  <bug-291867-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291867

            Bug ID: 291867
           Summary: route(8): "route flush" does nothing since netlink
                    changes
           Product: Base System
           Version: 15.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: gavin@FreeBSD.org

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-291867-227>