Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Feb 1999 10:16:22 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        net@FreeBSD.org
Subject:   bug with "de" driver and multicast routing in 3.x and above
Message-ID:  <199902270916.KAA27160@labinfo.iet.unipi.it>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902270916.KAA27160>