diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2005-04-17 13:41:52 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2005-04-17 13:41:52 +0000 |
commit | dcda2fe9f1aad29ca2e5b02846a6a7aa9a69601e (patch) | |
tree | e4c2ca619211a26f6a0c4b2c343661cddeed275d /sys | |
parent | 81516c32df87d3df8c8e476727323fb1213b5bc9 (diff) |
don't disassociate on SIOCSIFADDR if the interface is already up and running.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ral.c | 13 | ||||
-rw-r--r-- | sys/dev/pci/if_ipw.c | 15 | ||||
-rw-r--r-- | sys/dev/pci/if_iwi.c | 15 | ||||
-rw-r--r-- | sys/dev/usb/if_ral.c | 13 |
4 files changed, 14 insertions, 42 deletions
diff --git a/sys/dev/ic/ral.c b/sys/dev/ic/ral.c index 5d4b5eaaf69..cd223285e99 100644 --- a/sys/dev/ic/ral.c +++ b/sys/dev/ic/ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ral.c,v 1.48 2005/04/02 10:53:03 damien Exp $ */ +/* $OpenBSD: ral.c,v 1.49 2005/04/17 13:41:48 damien Exp $ */ /*- * Copyright (c) 2005 @@ -2067,18 +2067,11 @@ ral_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCSIFADDR: ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { #ifdef INET - case AF_INET: + if (ifa->ifa_addr->sa_family == AF_INET) arp_ifinit(&ic->ic_ac, ifa); - ral_init(ifp); - break; #endif - default: - ral_init(ifp); - } - break; - + /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if (ifp->if_flags & IFF_RUNNING) diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index dd83d311f5a..07551244930 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ipw.c,v 1.46 2005/04/04 16:32:42 damien Exp $ */ +/* $OpenBSD: if_ipw.c,v 1.47 2005/04/17 13:41:46 damien Exp $ */ /*- * Copyright (c) 2004, 2005 @@ -1383,20 +1383,13 @@ ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: - ifa = (struct ifaddr *) data; + ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { #ifdef INET - case AF_INET: + if (ifa->ifa_addr->sa_family == AF_INET) arp_ifinit(&ic->ic_ac, ifa); - ipw_init(ifp); - break; #endif - default: - ipw_init(ifp); - } - break; - + /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if (!(ifp->if_flags & IFF_RUNNING)) diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index 54ec2e1b8bc..ffd5f7aaed0 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.34 2005/04/04 16:37:07 damien Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.35 2005/04/17 13:41:46 damien Exp $ */ /*- * Copyright (c) 2004, 2005 @@ -1269,20 +1269,13 @@ iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: - ifa = (struct ifaddr *) data; + ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { #ifdef INET - case AF_INET: + if (ifa->ifa_addr->sa_family == AF_INET) arp_ifinit(&ic->ic_ac, ifa); - iwi_init(ifp); - break; #endif - default: - iwi_init(ifp); - } - break; - + /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if (!(ifp->if_flags & IFF_RUNNING)) diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c index 8534f743de0..299f2dfc3ab 100644 --- a/sys/dev/usb/if_ral.c +++ b/sys/dev/usb/if_ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral.c,v 1.27 2005/04/16 08:27:41 damien Exp $ */ +/* $OpenBSD: if_ral.c,v 1.28 2005/04/17 13:41:51 damien Exp $ */ /*- * Copyright (c) 2005 @@ -1398,18 +1398,11 @@ ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCSIFADDR: ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { #ifdef INET - case AF_INET: + if (ifa->ifa_addr->sa_family == AF_INET) arp_ifinit(&ic->ic_ac, ifa); - ural_init(ifp); - break; #endif - default: - ural_init(ifp); - } - break; - + /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if (ifp->if_flags & IFF_RUNNING) |