ip monitor bug
From: Benoit PAPILLAULT <hidden>
Date: 2007-09-15 16:02:35
Hi there, I'd like to get feedbacks on the following scenario and whether it's a bug or not. Moreover, i'd like to know how to make a route permanent (ie never removed by the kernel). # configure eth0 with IP 1.1.1.1 ifconfig eth0 1.1.1.1 up # show routes added by the kernel (expected results) ip route show dev eth0 1.0.0.0/8 proto kernel scope link src 1.1.1.1 # start ip monitor in background ip monitor & # add a specific route, properly reported by ip monitor (second line) ip route add 192.168.168.168/32 dev eth0 192.168.168.168 dev eth0 scope link # change eth0 IP address to 2.2.2.2 ifconfig eth0 2.2.2.2 up Deleted 2: eth0 inet 1.1.1.1/8 brd 1.255.255.255 scope global eth0 Deleted 1.0.0.0/8 dev eth0 proto kernel scope link src 1.1.1.1 Deleted broadcast 1.255.255.255 dev eth0 table 255 proto kernel scope link src 1.1.1.1 Deleted broadcast 1.0.0.0 dev eth0 table 255 proto kernel scope link src 1.1.1.1 Deleted local 1.1.1.1 dev eth0 table 255 proto kernel scope host src 1.1.1.1 2: eth0 inet 2.2.2.2/8 brd 2.255.255.255 scope global eth0 local 2.2.2.2 dev eth0 table 255 proto kernel scope host src 2.2.2.2 broadcast 2.255.255.255 dev eth0 table 255 proto kernel scope link src 2.2.2.2 2.0.0.0/8 dev eth0 proto kernel scope link src 2.2.2.2 broadcast 2.0.0.0 dev eth0 table 255 proto kernel scope link src 2.2.2.2 # display routing table on eth0 ip route show dev eth0 2.0.0.0/8 proto kernel scope link src 2.2.2.2 So, the specific route (192.168.168.168/32) has been removed and ip monitor does not report it! I consider it to be a bug. I've been digging a bit into the kernel source code (devinet.c, fib_frontend.c) without much success. Moreover, is there a way that the specific route (192.168.168.168/32) be keept even if eth0 IP changed? Best regards, Benoit PS: Don't tell me about IP range, netmask and such, i've been using /32 route for a while with IP in different ranges.