diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-12-17 15:46:24 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2010-12-17 15:46:24 +0100 |
commit | 386bfdaf9e4e8313efe546b26971d22f90db56fd (patch) | |
tree | 803eb98f8483aa479d1ae8352a5a6f747ae6d565 | |
parent | 957f824a2cbc43e1cfec179c47d55b7c58b54bf7 (diff) | |
download | bird-386bfdaf9e4e8313efe546b26971d22f90db56fd.tar bird-386bfdaf9e4e8313efe546b26971d22f90db56fd.zip |
BSD: link-local addresses are never unnumbered
-rw-r--r-- | proto/bgp/packets.c | 4 | ||||
-rw-r--r-- | sysdep/bsd/krt-sock.c | 2 |
2 files changed, 2 insertions, 4 deletions
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)) diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 53b30ca..fc73be8 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -541,7 +541,7 @@ krt_read_addr(struct ks_msg *msg) _I0(ifa.ip) = 0xfe800000; #endif - if (iface->flags & IF_MULTIACCESS) + if ((iface->flags & IF_MULTIACCESS) || ipa_has_link_scope(ifa.ip)) { ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen)); |