summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2010-12-17 09:53:21 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2010-12-17 09:53:21 +0100
commit957f824a2cbc43e1cfec179c47d55b7c58b54bf7 (patch)
tree1f0974d01f872e00c367adff153a008345612a03
parent7a03ded81bf2d07331d8fb87c2c7613cb4dd518e (diff)
downloadbird-957f824a2cbc43e1cfec179c47d55b7c58b54bf7.tar
bird-957f824a2cbc43e1cfec179c47d55b7c58b54bf7.zip
BGP: link-local peering: send unspecified address as next hop to conform with RFC 4659
-rw-r--r--proto/bgp/packets.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index 356d8bd..4372572 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -436,7 +436,10 @@ bgp_create_update(struct bgp_conn *conn, byte *buf)
*tmp++ = 1;
class = ipa_classify(ip);
- if (ipa_nonzero(ip_ll) && ((class & IADDR_SCOPE_MASK) != SCOPE_LINK))
+ if ((class & IADDR_SCOPE_MASK) == SCOPE_LINK)
+ ip = IPA_NONE;
+
+ if (ipa_nonzero(ip_ll))
{
*tmp++ = 32;
ipa_hton(ip);