diff options
author | luigi <luigi@FreeBSD.org> | 2002-11-25 20:00:13 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-11-25 20:00:13 +0000 |
commit | a4be2cca5bca514b06e79d2b19a562a800190895 (patch) | |
tree | d0e0a117055502b106c0491ac941b952310e1050 /sys/dev/em | |
parent | a7a6eb6da6c7003000f09cf3bd4c91023aef8154 (diff) | |
download | FreeBSD-src-a4be2cca5bca514b06e79d2b19a562a800190895.zip FreeBSD-src-a4be2cca5bca514b06e79d2b19a562a800190895.tar.gz |
Fix IFF_ALLMULTI handling.
Reviewed by: pdeuskar (maintainer)
Approved by: re
Diffstat (limited to 'sys/dev/em')
-rw-r--r-- | sys/dev/em/if_em.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index 146d44f..e8f3672 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -529,14 +529,14 @@ em_ioctl(struct ifnet *ifp, IOCTL_CMD_TYPE command, caddr_t data) case SIOCSIFFLAGS: IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFFLAGS (Set Interface Flags)"); if (ifp->if_flags & IFF_UP) { - if (ifp->if_flags & IFF_RUNNING && - ifp->if_flags & IFF_PROMISC) { - em_set_promisc(adapter); - } else if (ifp->if_flags & IFF_RUNNING && - !(ifp->if_flags & IFF_PROMISC)) { - em_disable_promisc(adapter); - } else + /* + * init adapter if not running, then take care + * of possible changes in IFF_ALLMULTI and IFF_PROMISC + */ + if (!(ifp->if_flags & IFF_RUNNING)) em_init(adapter); + em_disable_promisc(adapter); + em_set_promisc(adapter); } else { if (ifp->if_flags & IFF_RUNNING) { em_stop(adapter); |