[Olsr-users] Solved: IPv6: Using link-local all-hosts multicast address ff02::1 instead of ff0e::1 with Linux?
Hannes Gredler
(spam-protected)
Wed Aug 20 16:33:30 CEST 2008
looks good - committed to TIP and 0.5.6 branch (that we have created first time
to add bugfixes only).
/hannes
On Wed, Aug 20, 2008 at 06:08:29AM -0700, Joerg Pommnitz wrote:
| Found it!
| Using link-local addresses the Linux kernel looks at the sin6_scope_id
| member of a struct sockaddr_in6. This one was randomly initialized.
| Patch (against 0.5.3):
|
| --- src/unix/ifnet.c (revision 1975)
| +++ src/unix/ifnet.c (working copy)
| @@ -776,13 +776,14 @@
| OLSR_PRINTF(debuglvl, "\tAddress: %s\n", ip6_to_string(&ifs.int6_addr.sin6_addr));
|
| /* Multicast */
| + memset (&ifs.int6_multaddr, 0, sizeof (ifs.int6_multaddr));
| + ifs.int6_multaddr.sin6_family = AF_INET6;
| + ifs.int6_multaddr.sin6_flowinfo = htonl(0);
| + ifs.int6_multaddr.sin6_scope_id = if_nametoindex(ifr.ifr_name);
| + ifs.int6_multaddr.sin6_port = htons(OLSRPORT);
| ifs.int6_multaddr.sin6_addr = (iface->cnf->ipv6_addrtype == IPV6_ADDR_SITELOCAL) ?
| iface->cnf->ipv6_multi_site.v6 :
| iface->cnf->ipv6_multi_glbl.v6;
| - /* Set address family */
| - ifs.int6_multaddr.sin6_family = AF_INET6;
| - /* Set port */
| - ifs.int6_multaddr.sin6_port = htons(OLSRPORT);
|
| #ifdef __MacOSX__
| ifs.int6_multaddr.sin6_scope_id = 0;
|
|
|
| --
| Regards
| Joerg
|
| __________________________________________________
| Do You Yahoo!?
| Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails.
| http://mail.yahoo.com
|
| --
| Olsr-users mailing list
| (spam-protected)
| http://lists.olsr.org/mailman/listinfo/olsr-users
|
More information about the Olsr-users
mailing list