BGP: Add support for peering with link-local IPv6 addresses

Matthias Schiffer mschiffer at universe-factory.net
Fri Dec 24 11:20:22 CET 2010


On 12/22/2010 06:45 PM, Ondrej Zajicek wrote:
> On Sun, Dec 19, 2010 at 09:55:24AM +0100, Matthias Schiffer wrote:
>> Anyways, I'd love to see this patch included in Bird. It shouldn't make
>> any difference when you don't use the interface attribute, so it won't have
>> bad influence on people not using this feature, and it makes Bird an
>> alternative to Quagga when you need link-local peering support. :-)
> I checked the patch and it seems that there are some issues with the
> neighbor cache - neigh_find2() really doesn't work with NEF_STICKY and
> link-local together, because the main purpose of sticky neighbors is to
> notify the protocol when the appropriate iface appears and is ready. If
> the iface is not found in bgp_start_locked(), (call if_find_by_name()
> returns NULL), the BGP session is never started (even if the interface
> later appears). I will look at that.
NEF_STICKY doesn't seem to work for BGP at all. Even without my patch,
the line with the message "Waiting for %I to become my neighbor" is
never reached, as neigh_find sets the scope of the returned neighbor to
0 if the neighbor is not found, but as 0 is equivalent to SCOPE_HOST,
the neighbor is declared invalid and the protocol will be disabled. I
guess it's not intended to return SCOPE_HOST when the neighbor is not
found...

Also, the neighbor cache won't notify the protocol if the neighbor
becomes available by adding a new address to an up interface and the
interface doesn't go down and up again afterwards.

I think these problems have to be solved first... making NEF_STICKY work
with link-local addresses should be as easy as saving the interface
given to neigh_find2 in the neighbor entry and checking for it in
neigh_if_up. Anyways, that problem applies to my code only when the
given interface does exist, so it can be found by if_find_by_name, but
that interface doesn't have a link-local address defined. When the given
interface doesn't exist in the first place, neigh_find2 will never be
called; an additional notification for up-coming interface for the BGP
protocol would be necessary.

Thanks for looking at my patch, and a merry christmas everyone,
Matthias Schiffer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20101224/f82dcd6f/attachment-0001.asc>


More information about the Bird-users mailing list