From 957f824a2cbc43e1cfec179c47d55b7c58b54bf7 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 17 Dec 2010 09:53:21 +0100 Subject: BGP: link-local peering: send unspecified address as next hop to conform with RFC 4659 --- proto/bgp/packets.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3