Date: Sun, 09 Jul 2000 11:01:24 +0900 From: itojun@iijlab.net To: net@freebsd.org Cc: jlemon@freebsd.org Subject: repair IPv6 allmulti Message-ID: <29284.963108084@coconut.itojun.org>
next in thread | raw e-mail | index | archive | help
IPV6_JOIN_GROUP to :: (all-zero IPv6 address, meaning "all multi")
has been broken for the following platforms:
FreeBSD 4.0-RELEASE (and STABLE)
FreeBSD-current
KAME/FreeBSD 4.0
Basically what we need is a behavior similar to original BSD
in_addmulti(), in in6_addmulti(). if we join all-zero address, we
need a join to all multicast. FreeBSD multicast code removed
this semantics (all-zero means all multi) somewhere between 2.x and 3.x.
we have been using the following in KAME/FreeBSD 3.x. i'd like to
bring it into FreeBSD-current. (adding all-zero case into
ether_resolvemulti) without this, we need a code duplicate of
if_addmulti() into in6_addmulti(), which is a maintenance headache
(also as i don't know about freebsd multicast code too well, i can't
handle it).
itojun
Index: if_ethersubr.c
===================================================================
RCS file: /cvsroot/kame/kame/freebsd4/sys/net/if_ethersubr.c,v
retrieving revision 1.4
diff -c -r1.4 if_ethersubr.c
*** if_ethersubr.c 2000/04/28 14:00:03 1.4
--- if_ethersubr.c 2000/07/09 01:58:15
***************
*** 808,813 ****
--- 808,823 ----
#ifdef INET6
case AF_INET6:
sin6 = (struct sockaddr_in6 *)sa;
+ if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
+ /*
+ * An IP6 address of 0 means listen to all
+ * of the Ethernet multicast address used for IP6.
+ * (This is used for multicast routers.)
+ */
+ ifp->if_flags |= IFF_ALLMULTI;
+ *llsa = 0;
+ return 0;
+ }
if (!IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))
return EADDRNOTAVAIL;
MALLOC(sdl, struct sockaddr_dl *, sizeof *sdl, M_IFMADDR,
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29284.963108084>
