[mpls-linux-devel] Dead code in bgp_zebra.c
Status: Beta
Brought to you by:
jleu
From: boris y. <bor...@ru...> - 2013-04-15 15:11:22
|
In the process of my investigation on the BGP protocol in quagga I have come to the conclusion that there is some dead code in bgp_zebra.c, routine bgp_nexthop_set: It seems like the methods if_lookup_by_* (if_lookup_by_ipv4 or if_lookup_by_ipv6) will always return NULL. The reason being, whenever we receive a new interface update from zebra daemon to bgp daemon, we do not link it to the ifp->connected list. In *bgp_nexthop_set *the logic does a lookup using the mentioned methods in order to locate the interface pointer: ifp = if_lookup_by_ipv* if (!ifp) return -1; Most of the routine *bgp_nexthop_set* continues to assign the nexthop past this point, which never executes. I supposed the moderator should look into that and remove the dead code or fix the "lookup" mechanism. My quagga version is: 0.99.20.1 /Boris |