From owner-freebsd-net Sun Nov 17 9:36:59 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 821F437B401; Sun, 17 Nov 2002 09:36:57 -0800 (PST) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DE2A43E42; Sun, 17 Nov 2002 09:36:57 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.3/8.12.3) with ESMTP id gAHHauAh017730; Sun, 17 Nov 2002 09:36:56 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.3/8.12.3/Submit) id gAHHauVo017729; Sun, 17 Nov 2002 09:36:56 -0800 (PST) (envelope-from rizzo) Date: Sun, 17 Nov 2002 09:36:56 -0800 From: Luigi Rizzo To: net@freebsd.org Subject: broken IFF_ALLMULTI handling in many drivers Message-ID: <20021117093656.A17547@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org [Bcc to re@ because it would be good to have it fixed before 5.0] Hi, Pavlin Radoslavov recently discovered a problem that affects several network drivers and tends to show up when running multicast routing. The problem is that the multicast routing code calls iff_allmulti() on the interfaces, which should enable them to receive all multicast packets. The device independent code sets the IFF_ALLMULTI flag in the ifp, and then calls the device-specific ioctl handler for SIOCSIFFLAGS. Individual drivers handle this call in the most various ways. Some unconditionally reinitialize the hardware; some try to be smart and only check which IFF_* flags have changed and perform appropriate actions. And here is the problem -- several drivers forget to check for a change in IFF_ALLMULTI, thus causing the change to be ignored until some future action on the interface causes it (or its multicast filter) to be reinitialized. A list of broken which are broken and good is below. The 'broken' list is worrysome as it includes a lot of new/high performance/wireless cards. Broken: dc mn sf sk ste ti tl xl an bge em gem gx ie lge sr aue cue kue wi xe Correct: de rl sis vr wb ar(?) cnw cs ed ep ex fe fxp hme lnc my nge ray sbni sn tx txp vx wl I believe the best way to fix this bug (in the *_ioctl handler, for the SIOCSIFFLAGS case) is to follow the approach used by the cs, ed, fe and vx drivers -- but if others have better suggestions please let me know. So, provided re@ approves, expect to see some commits to the drivers in the 'broken' list related to this problem. cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2988 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message