Bug 250552 - [net] [fib] dangling route table entry after destroying interface
Summary: [net] [fib] dangling route table entry after destroying interface
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-23 03:14 UTC by Zhenlei Huang
Modified: 2020-11-08 11:19 UTC (History)
2 users (show)

See Also:


Attachments
Draft patch to fix 12 STABLE (906 bytes, patch)
2020-10-24 10:47 UTC, Zhenlei Huang
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zhenlei Huang 2020-10-23 03:14:48 UTC
I'm testing FreeBSD's multiple FIBs feature. Dangling route table entry remains when deleting ip address from interface after migrating the interface's fib number. It looks weird.

This can be reproduced on FreeBSD 12.1 RELEASE-p10 and FreeBSD 12.2 RC2.

Steps to repeat: 
On a system with net.fibs=4, Run the following commands:

# ifconfig tap0 create fib 1
# ifconfig tap0 inet 192.0.2.1/24
# netstat -rnf inet -F 1
Routing tables (fib: 1)

Internet:
Destination        Gateway            Flags     Netif Expire
192.0.2.0/24       link#4             U          tap0
192.0.2.1          link#4             UHS         lo0

# ifconfig tap0 fib 2
# ifconfig tap0 inet 192.0.2.1/24 delete
# netstat -rnf inet -F 1
Routing tables (fib: 1)

Internet:
Destination        Gateway            Flags     Netif Expire
192.0.2.1          link#4             UHS         lo0


**** Notice the loopback route table entry 192.0.2.1 remains after deleting address's of tap0. ****


# ifconfig tap0 destroy
# netstat -rnf inet -F 1
Routing tables (fib: 1)

Internet:
Destination        Gateway            Flags     Netif Expire
192.0.2.1          link#4             UHS         lo0

**** Notice again the loopback route table entry 192.0.2.1 remains after destroying interface tap0. ****
Comment 1 Zhenlei Huang 2020-10-24 10:47:31 UTC
Created attachment 219032 [details]
Draft patch to fix 12 STABLE