patch for route deletion issue

Li, Qing qing.li at bluecoat.com
Sat Oct 22 06:40:30 UTC 2011


The host-id/interface-id can have a specific value and is properly masked out when 
adding a prefix route. As in

	route add -net 192.103.54.9/24 10.9.44.1   

	OR for IPv6

	route add -inet6 -net 2001:db8:1::1/48 2001:418:1800::1

The problem is when deleting the route, simply changing the command keyword
from "add" to "delete" does not work. In other words,

	route delete -net 192.103.54.9/24 10.9.44.1  

	OR for IPv6

	route delete -inet6 -net 2001:db8:1::1/48 2001:418:1800::1

will return a route-not-found error. However, issue the command with the host-id
or interface-id cleared works, as in:

	route add -inet 192.103.54.0/24 10.9.44.1

	OR for IPv6

	route delete -inet6 -net 2001:db8:1::/48 2001:418:1800::1

The failure has been observed on 7.x, 8.x, 9.x and -current.

The route command behavior should be consistent between "add" and "delete".
In addition, providing the proper prefix value can be a bit of work depending
on the prefix length.

The patch that fixes the described issue sits in 

	http://people.freebsd.org/~qingli/route.c.diff

Please apply this patch and report issues if any. I intend to commit the
patch in a few days.

Thanks,

-- Qing



More information about the freebsd-net mailing list