diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-04-28 18:22:30 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-04-28 18:22:30 +0000 |
commit | 379c0b2a5897fdb58b4a8bf2f829d04b7b8a5eb9 (patch) | |
tree | 5f2c2ec53fbf716748cfc2a5f699877de876d398 /sys/dev/pci/if_em.c | |
parent | df05a7595dea811e762df7ff5e687695cd513f5a (diff) |
when setting the interface address, only call em_init() if the interface
is not already running.
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r-- | sys/dev/pci/if_em.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 7da9cc24cbc..bdaab019e7c 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.115 2006/04/18 19:06:02 brad Exp $ */ +/* $OpenBSD: if_em.c,v 1.116 2006/04/28 18:22:29 brad Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -474,16 +474,12 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data) IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFADDR (Set Interface " "Addr)"); ifp->if_flags |= IFF_UP; - em_init(sc); - switch (ifa->ifa_addr->sa_family) { + if (!(ifp->if_flags & IFF_RUNNING)) + em_init(sc); #ifdef INET - case AF_INET: + if (ifa->ifa_addr->sa_family == AF_INET) arp_ifinit(&sc->interface_data, ifa); - break; #endif /* INET */ - default: - break; - } break; case SIOCSIFMTU: IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); |