Fix handling of IFF_ALLMULTI. The code did not call

tulip_addr_filter() on SIOCSIFFLAGS, and was nuking the IFF_ALLMULTI
on entering tulip_addr_filter(). As a result it was impossible to run
a multicast router on a machine with a "de" interface.
This commit is contained in:
Luigi Rizzo 1999-03-01 16:54:28 +00:00
parent f8821e4aa3
commit d560f7208b
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/* $NetBSD: if_de.c,v 1.80 1998/09/25 18:06:53 matt Exp $ */
/* $Id: if_de.c,v 1.97 1999/01/29 08:29:05 bde Exp $ */
/* $Id: if_de.c,v 1.98 1999/01/29 11:31:45 bde Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -3085,7 +3085,8 @@ tulip_addr_filter(
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
@ -4754,6 +4755,7 @@ tulip_ifioctl(
printf(TULIP_PRINTF_FMT ": ignored invalid media request\n", TULIP_PRINTF_ARGS);
}
#endif
tulip_addr_filter(sc); /* reinit multicast filter */
tulip_init(sc);
break;
}

View File

@ -1,5 +1,5 @@
/* $NetBSD: if_de.c,v 1.80 1998/09/25 18:06:53 matt Exp $ */
/* $Id: if_de.c,v 1.97 1999/01/29 08:29:05 bde Exp $ */
/* $Id: if_de.c,v 1.98 1999/01/29 11:31:45 bde Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com)
@ -3085,7 +3085,8 @@ tulip_addr_filter(
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
@ -4754,6 +4755,7 @@ tulip_ifioctl(
printf(TULIP_PRINTF_FMT ": ignored invalid media request\n", TULIP_PRINTF_ARGS);
}
#endif
tulip_addr_filter(sc); /* reinit multicast filter */
tulip_init(sc);
break;
}