[quagga-users 1193] ospf6 on 2.6.x linux kernel - IN6_IS_ADDR_LINKLOCAL - fe80::/128
https://lists.quagga.net/pipermail/quagga-dev/2004-January/000786.html
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Lukasz Biegaj wrote: | Is there a way to make OSPF6 work on 2.6.x linux kernels? | | Currently I see this in logs: | 2003/12/24 11:23:13 OSPF6: LSA: originate [AS-External ID=0.0.0.9 Adv=80.55.247.118] seq: 0x80000001 age: 0 | 1072261393.983434 | 2003/12/24 11:23:13 OSPF6: ASBR: start redistributing 2000::/3 as LS-ID 10: 1072261393.983804 | 2003/12/24 11:23:13 OSPF6: ASBR: schedule redistribution 2000::/3 as LS-ID 10 after 0 sec | 2003/12/24 11:23:13 OSPF6: LSA: originate [AS-External ID=0.0.0.10 Adv=80.55.247.118] seq: 0x80000001 age: 0 | 1072261393.983985 | 2003/12/24 11:23:14 OSPF6: Network: Join AllDRouters on ifindex 4 | 2003/12/24 11:23:14 OSPF6: Network: sendmsg (ifindex: 4) failed: Invalid argument(22) [...] | Linux 2.6.0, Debian SID, quagga from apt. | we ran into the same problem and found this: * Linux 2.6 seems to list all multicast / anycast adresses together with unicast addresses: [equinox at spaceboyz]:~ # ip a l dc2 9: dc2 at NONE: <POINTOPOINT,MULTICAST,NOARP,UP> mtu 1460 qdisc noqueue ~ link/gre 0.0.0.0 peer 217.82.189.49 ~ inet 172.22.24.1 peer 172.22.2.2/32 scope global dc2 ~ inet6 fe80::ac17:2402/64 scope link ~ valid_lft forever preferred_lft forever ~ inet6 ff02::5/128 scope global ~ valid_lft forever preferred_lft forever ~ inet6 ff02::1/128 scope global ~ valid_lft forever preferred_lft forever ~ inet6 fe80::/128 scope global ~ valid_lft forever preferred_lft forever (note the 2nd last line) * ospf6d uses the address list for selecting a linklocal address with IN6_IS_ADDR_LINKLOCAL (quagga/ospf6d/ospf_interface.c:192) ~ /* linklocal scope check */ ~ if (IN6_IS_ADDR_LINKLOCAL (&c->address->u.prefix6)) ~ l = &c->address->u.prefix6; * IN6_IS_ADDR_LINKLOCAL is defined in /usr/include/netinet/in.h:307 as follows: #define IN6_IS_ADDR_LINKLOCAL(a) ~ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) ~ == htonl (0xfe800000)) * in conjunction with 2.6 reporting all multicast/anycast addresses, this gets fe80:: (all-routers as far as i remember) into the OSPF6 interface, but the kernel will reject this (of course...): ~ OSPF6: Network: sendmsg (ifindex: 9) failed: Invalid argument(22) I don't know whose fault it is (how is IN6_IS_ADDR_LINKLOCAL defined to work? Is it OK for the kernel to include anycast/multicast addresses?) but this breaks ospf6d. Our fix was to change netinet/in.h because IN6_IS_ADDR_LINKLOCAL returning !0 only for unicast addresses seemed to be "the right thing". Patch attached. (categorize that patch as "dirty works-for-me hack") David Lamparter P.S.: glibc people please Cc me, i'm only subscribed to netdev and quagga-* System environment: Linux Kernel 2.6.1, x86, non-SMP, preemptible, vanilla GNU C Library stable release version 2.3.2, by Roland McGrath et al. quagga 0.96.4 CVS (Fre Jan 16 16:43:35 CET 2004) gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice) - -- A0C21986 David Lamparter (equinox) <david.lamparter at t-online.de> 2D7F 5CC6 93AD 38DD 6CD5 47A0 A5F0 4657 A0C2 1986 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFACAplpfBGV6DCGYYRAlQ9AJ44NbGi+WCVsMiCqq7Sklg7cKq1GQCePAjn QK+iNxE0JP+rdar7H3Ceapw= =QdyO -----END PGP SIGNATURE----- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: glibc-ipv6-is_linklocal.patch URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20040116/cb9a667c/attachment.ksh>