From owner-freebsd-net Sat Jul 8 19: 1:29 2000 Delivered-To: freebsd-net@freebsd.org Received: from coconut.itojun.org (coconut.itojun.org [210.160.95.97]) by hub.freebsd.org (Postfix) with ESMTP id 3AB2B37BE3E; Sat, 8 Jul 2000 19:01:26 -0700 (PDT) (envelope-from itojun@itojun.org) Received: from kiwi.itojun.org (localhost.itojun.org [127.0.0.1]) by coconut.itojun.org (8.9.3+3.2W/3.7W) with ESMTP id LAA29286; Sun, 9 Jul 2000 11:01:24 +0900 (JST) To: net@freebsd.org Cc: jlemon@freebsd.org Subject: repair IPv6 allmulti X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 From: itojun@iijlab.net Date: Sun, 09 Jul 2000 11:01:24 +0900 Message-ID: <29284.963108084@coconut.itojun.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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