From 386bfdaf9e4e8313efe546b26971d22f90db56fd Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 17 Dec 2010 15:46:24 +0100 Subject: BSD: link-local addresses are never unnumbered --- proto/bgp/packets.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'proto/bgp') diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 4372572..7816c1d 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -324,7 +324,6 @@ bgp_create_update(struct bgp_conn *conn, byte *buf) struct bgp_proto *p = conn->bgp; struct bgp_bucket *buck; int size, second, rem_stored; - int class; int remains = BGP_MAX_PACKET_LENGTH - BGP_HEADER_LENGTH - 4; byte *w, *w_stored, *tmp, *tstart; ip_addr *ipp, ip, ip_ll; @@ -435,8 +434,7 @@ bgp_create_update(struct bgp_conn *conn, byte *buf) *tmp++ = BGP_AF_IPV6; *tmp++ = 1; - class = ipa_classify(ip); - if ((class & IADDR_SCOPE_MASK) == SCOPE_LINK) + if (ipa_has_link_scope(ip)) ip = IPA_NONE; if (ipa_nonzero(ip_ll)) -- cgit v1.2.3