BGP: Add support for peerings with link-local v6 addresses

Ondrej Zajicek santiago at crfreenet.org
Sun Jan 1 12:37:29 CET 2012


On Thu, Dec 29, 2011 at 10:56:43PM +0100, Matthias Schiffer wrote:
> Hi,
> I already posted a first patch to add support for link-local addresses
> for BGP peerings one year ago, and now I've finally found time to
> update the patch for the current bird version and fix the problems
> mentioned in reply to the first patch.
> 
> This patch series allows using NEF_STICKY neighbors for link-local
> addresses by saving the interface name in the neighbor structure,
> thus working even when the interface is removed and re-added causing
> the interface index to change.

Hello

Thanks for the patch. I noticed that struct iface could exist even
if the iface is missing (this is done when iface is removed),
so sticky link-local neighbors could be implemented and used
in more uniform way (using neigh_find2() with NEF_STICKY,
like it is done for neighbors with global addresses).

I implemented it in that way and adapted the static protocol for that
(primarily for testing). See attached patch. Instead of separate option,
this also uses standard syntax (like fe80::1%eth0) for link-local
addresses. I will adapt the rest of your BGP patch to that and merge
it.

> An additional patch that is needed to make this work under FreeBSD
> is also included; the current behaviour doesn't handle numbered v6
> addresses on peer-to-peer interfaces correctly, which link-local
> addresses are generally. I didn't get the chance to test this under
> other BSDs though.

Thanks.

The patch is:

+#ifdef IPV6
+  if ((iface->flags & IF_MULTIACCESS) || (masklen != BITS_PER_IP_ADDRESS))
+#else
   if (iface->flags & IF_MULTIACCESS)
+#endif

Does anybody know, whether there should ever be check for (iface->flags &
IF_MULTIACCESS), and not just the (masklen != BITS_PER_IP_ADDRESS), like it
is in the Linux code? 

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ll_sticky.patch
Type: text/x-diff
Size: 7909 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20120101/68a80840/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20120101/68a80840/attachment.asc>


More information about the Bird-users mailing list