From owner-freebsd-current Sun Jan 31 20:58:46 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA19485 for freebsd-current-outgoing; Sun, 31 Jan 1999 20:58:46 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA19480 for ; Sun, 31 Jan 1999 20:58:45 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.1/8.9.1) id XAA14745; Sun, 31 Jan 1999 23:58:31 -0500 (EST) (envelope-from wollman) Date: Sun, 31 Jan 1999 23:58:31 -0500 (EST) From: Garrett Wollman Message-Id: <199902010458.XAA14745@khavrinen.lcs.mit.edu> To: Bill Paul Cc: current@FreeBSD.ORG Subject: SIOCADDMULTI doesn't work, proposed fix In-Reply-To: <199901312255.RAA01895@skynet.ctr.columbia.edu> References: <199901312255.RAA01895@skynet.ctr.columbia.edu> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < said: > a struct sockaddr_dl will be used. However, the user is supposed to > pass the address using a struct ifreq, and struct ifreq uses struct > sockaddr, not struct sockaddr_dl. This is called ``poor man's inheritance''. I believe it is an error for any code to use AF_UNSPEC for any purpose other than masks (where it makes sense since the address family is normally not included in the mask). A `sockaddr_dl', while by default longer than a `sockaddr', in this case will fit withing the structure allotted. In the future, I fully expect that `sockaddr' will be of maximal length (we need this for IPv6). > The patches included with this post change /sys/net/if.c and > /sys/net/if_ethersubr.c so that adding a mutlicast address with > SIOCADDMULTI using a struct sockaddr and AF_UNSPEC works again. I would > like Those Who Know More Than I (tm) to review these changes and offer > criticisms and comments. There are two things which should be done here. First, the kernel AppleTalk code should be fixed to join the necessary multicast groups when an interface is first configured for AppleTalk. (By preference the AARP implementation should be entirely in the kernel as well, but that's more of a challenge.) Second, the generic ether_resolvemulti function should be enhanced to know about AppleTalk multicast addresses. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message