From owner-freebsd-net Sun Feb 28 18: 0:48 1999 Delivered-To: freebsd-net@freebsd.org Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (Postfix) with SMTP id 67921150D2 for ; Sun, 28 Feb 1999 18:00:42 -0800 (PST) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id KAA27160; Sat, 27 Feb 1999 10:16:23 +0100 From: Luigi Rizzo Message-Id: <199902270916.KAA27160@labinfo.iet.unipi.it> Subject: bug with "de" driver and multicast routing in 3.x and above To: net@FreeBSD.org Date: Sat, 27 Feb 1999 10:16:22 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2202 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I think i found a subtle problems in running multicast routers on 3.0 and above with the "de" driver. After a few hints from Bill Fenner, it took me a few hours to track this problem, so i think it is good to tell people what is happening. The thing is, multicast routers request interface to receive all multicast pkts. In 3.x this is done calling the chain add_vif() --> if_allmulti() --> ioctl( ... SIOCSIFFLAGS ...) which results in IFF_ALLMULTI being set and a call to the driver to do the right thing. The "de" driver fails to handle this properly in two places: * in the ioctl handler for SIOCSIFFLAGS, because it does not update the internal flag TULIP_ALLMULTI. I think a way to achieve this is adding a call to tulip_addr_filter() * in tulip_addr_filter(), because the first thing it does is to reset IFF_ALLMULTI (ouch!) thus losing the info it needs. The bug seems to be present also in the latest version of the de driver from Matt Thomas (v981011) in our tree. A fix (attached) is very short. I will commit it as soon as we have IP connectivity again (which should hopefully happen by the time you can read this email). Surprises with the de driver are not over. I still see (on 3.1) that frequently the interface goes down and never comes up by itself, requesting manual ifconfig down/ifconfig up... Have not had the time to investigate this behaviour though. cheers luigi su-2.02# diff -ubwr /tmp/if_de.c /sys/pci/if_de.c --- /tmp/if_de.c Sat Feb 27 12:17:01 1999 +++ /sys/pci/if_de.c Sat Feb 27 12:17:43 1999 @@ -3086,7 +3086,8 @@ sc->tulip_cmdmode &= ~TULIP_CMD_RXRUN; sc->tulip_intrmask &= ~TULIP_STS_RXSTOPPED; #if defined(IFF_ALLMULTI) - sc->tulip_if.if_flags &= ~IFF_ALLMULTI; + if (sc->tulip_if.if_flags & IFF_ALLMULTI) + sc->tulip_flags |= TULIP_ALLMULTI ; #endif #if defined(__FreeBSD__) && __FreeBSD_version >= 300000 @@ -4755,6 +4756,7 @@ printf(TULIP_PRINTF_FMT ": ignored invalid media request\n", TULIP_PRINTF_ARGS); } #endif + tulip_addr_filter(sc); /* XXX lr reset multicast filtering */ tulip_init(sc); break; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message