diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-04-02 11:36:38 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-04-02 11:36:38 +0200 |
commit | 97ab4c34986139b2419c563a3de7ddfe41727d07 (patch) | |
tree | a17e12cc6ce18a576e2fc3b2c89e163d2bbe1484 /sysdep/bsd | |
parent | bed417288e989c48a1362bb1177f436a2e2f9f4f (diff) | |
download | bird-97ab4c34986139b2419c563a3de7ddfe41727d07.tar bird-97ab4c34986139b2419c563a3de7ddfe41727d07.zip |
Fixes link-local addresses on BSD.
Diffstat (limited to 'sysdep/bsd')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 1dd09ae..1a2cc9f 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -515,6 +515,14 @@ krt_read_addr(struct ks_msg *msg) } ifa.scope = scope & IADDR_SCOPE_MASK; + /* BSD returns some scope/interface ID as a part of link-local address */ + if (scope == (IADDR_HOST | SCOPE_LINK)) + { + /* Clean up that */ + _I0(ifa.ip) = 0xfe800000; + _I1(ifa.ip) = 0x00000000; + } + if (iface->flags & IF_MULTIACCESS) ifa.prefix = ipa_and(ifa.ip, ipa_mkmask(masklen)); else /* PtP iface */ |