Is it a bug of RADIX ?????
Alexander V. Chernikov
melifaro at ipfw.ru
Wed May 18 12:56:21 UTC 2011
On 18.05.2011 16:31, JACK wrote:
> After inserting the following IPv4 routers:
>
> 0x360AD0A2/30
> 0x360ADFEC/20
> 0x360AD082/30
>
> I try to delete the above routes, when delete the second
> route(0x360ADFEC/20), the operation fail.
Can you specify exact commands you are issuing to add/remove routes?
(or "route monitor" output if you are doing this from some dynamic
routing software)
The following order works for me (8.2-STABLE):
16:44 [0] bibi# route add -net 54.10.208.162/30 10.11.0.1
add net 54.10.208.162: gateway 10.11.0.1
16:45 [0] bibi# route add -net 54.10.223.236/20 10.11.0.1
add net 54.10.223.236: gateway 10.11.0.1
16:46 [0] bibi# route add -net 54.10.208.130/30 10.11.0.1
add net 54.10.208.130: gateway 10.11.0.1
16:46 [0] bibi# netstat -rn -finet | grep 54
54.10.208.0/20 10.11.0.1 UGS 0 0 em0
54.10.208.128/30 10.11.0.1 UGS 0 0 em0
54.10.208.160/30 10.11.0.1 UGS 0 0 em0
16:46 [0] bibi# route delete 54.10.208.0/20
delete net 54.10.208.0
16:48 [0] bibi# route delete 54.10.208.128/30
delete net 54.10.208.128
16:49 [0] bibi# route delete 54.10.208.160/30
delete net 54.10.208.160
16:49 [0] bibi# netstat -rn -finet | grep 54
16:49 [0] bibi#
> struct radix_node * rn_delete (........)
> {
> ...
> /*
> * Delete our route from mask lists.
> */
> if (netmask != NULL) {
> if ((x = rn_addmask(netmask, TRUE, head_off)) == NULL)
> return (NULL);
> netmask = x->rn_key;
> while (tt->rn_mask != netmask)
> if ((tt = tt->rn_dupedkey) == NULL)
> return (NULL); // rn_delete return here!!!
> }
> ...
> }
>
> but, if I delete as the following order, all routers was deleted
> successfully:
>
> 0x360AD0A2/30
> 0x360AD082/30
> 0x360ADFEC/20
>
>
> so, is it a bug of RADIX?
>
> /jack
>
>
>
>
> --
> View this message in context: http://freebsd.1045724.n5.nabble.com/Is-it-a-bug-of-RADIX-tp4406356p4406356.html
> Sent from the freebsd-net mailing list archive at Nabble.com.
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
More information about the freebsd-net
mailing list