diff options
author | 2006-12-26 17:02:09 +0000 | |
---|---|---|
committer | 2006-12-26 17:02:09 +0000 | |
commit | 7c955c9349d938ab0cbb911981f7f8b0c2f4e382 (patch) | |
tree | 3d5db60848d7023ab7f73d9d7d66af213ed082d9 | |
parent | There must be no alias address set, so check ifi->client->alias (diff) | |
download | wireguard-openbsd-7c955c9349d938ab0cbb911981f7f8b0c2f4e382.tar.xz wireguard-openbsd-7c955c9349d938ab0cbb911981f7f8b0c2f4e382.zip |
Don't re-initialize the card every time the IP address is changed.
Brings fxp into line with many other drivers.
From brad@, tested by martin@, thib@, pyr@, mk@ and Johan M:son
Lindman.
ok martin@
-rw-r--r-- | sys/dev/ic/fxp.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 66b8cdd4c27..27d801aa4a3 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.83 2006/12/13 17:13:01 deraadt Exp $ */ +/* $OpenBSD: fxp.c,v 1.84 2006/12/26 17:02:09 krw Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -1651,18 +1651,12 @@ fxp_ioctl(struct ifnet *ifp, u_long command, caddr_t data) switch (command) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - - switch (ifa->ifa_addr->sa_family) { -#ifdef INET - case AF_INET: + if (!(ifp->if_flags & IFF_RUNNING)) fxp_init(sc); +#ifdef INET + if (ifa->ifa_addr->sa_family == AF_INET) arp_ifinit(&sc->sc_arpcom, ifa); - break; #endif - default: - fxp_init(sc); - break; - } break; case SIOCSIFMTU: |