[Bug 263202] "route already in table" - even though it's not, and can't be deleted

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 13 Apr 2022 10:06:12 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263202

--- Comment #9 from Zhenlei Huang <zlei.huang@gmail.com> ---
(In reply to Pat Maddox from comment #8)
Thanks for your report.

It is weird that I managed to reproduce on 13.0 and also 13.1-RC2.

This is what I had tried:
# ifconfig tap0 create inet 100.120.128.187/24
# netstat -4rn
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
...
100.120.128.0/24   link#3             U          tap0
100.120.128.187    link#3             UHS         lo0
127.0.0.1          link#2             UH          lo0
...

# route add 100.120.128.187 -interface lo0
add host 100.120.128.187: gateway lo0 fib 0: route already in table

# route delete 100.120.128.187 -interface lo0
route: route has not been found
delete host 100.120.128.187: gateway lo0 fib 0: not in table

# route delete 100.120.128.187
delete host 100.120.128.187

# route add 100.120.128.187 -interface lo0
add host 100.120.128.187: gateway lo0

# netstat -4rn
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
...
100.120.128.0/24   link#3             U          tap0
100.120.128.187    link#2             UHS         lo0
127.0.0.1          link#2             UH          lo0
...

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