summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index bbcc27d0a57..9fa1df42524 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.158 2007/05/28 08:48:15 mcbride Exp $ */
+/* $OpenBSD: if.c,v 1.159 2007/05/29 02:21:18 claudio Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -793,7 +793,7 @@ if_clone_list(struct if_clonereq *ifcr)
if_cloners_count : ifcr->ifcr_count;
for (ifc = LIST_FIRST(&if_cloners); ifc != NULL && count != 0;
- ifc = LIST_NEXT(ifc, ifc_list), count--, dst += IFNAMSIZ) {
+ ifc = LIST_NEXT(ifc, ifc_list), count--, dst += IFNAMSIZ) {
bzero(outbuf, sizeof outbuf);
strlcpy(outbuf, ifc->ifc_name, IFNAMSIZ);
error = copyout(outbuf, dst, IFNAMSIZ);
@@ -1318,39 +1318,39 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p)
break;
case SIOCSIFLLADDR:
- if ((error = suser(p, 0)))
- return (error);
- ifa = ifnet_addrs[ifp->if_index];
- if (ifa == NULL)
- return (EINVAL);
- sdl = (struct sockaddr_dl *)ifa->ifa_addr;
- if (sdl == NULL)
- return (EINVAL);
- if (ifr->ifr_addr.sa_len != ETHER_ADDR_LEN)
- return (EINVAL);
+ if ((error = suser(p, 0)))
+ return (error);
+ ifa = ifnet_addrs[ifp->if_index];
+ if (ifa == NULL)
+ return (EINVAL);
+ sdl = (struct sockaddr_dl *)ifa->ifa_addr;
+ if (sdl == NULL)
+ return (EINVAL);
+ if (ifr->ifr_addr.sa_len != ETHER_ADDR_LEN)
+ return (EINVAL);
if (ETHER_IS_MULTICAST(ifr->ifr_addr.sa_data))
return (EINVAL);
- switch (ifp->if_type) {
+ switch (ifp->if_type) {
case IFT_ETHER:
case IFT_CARP:
case IFT_FDDI:
case IFT_XETHER:
case IFT_ISO88025:
case IFT_L2VLAN:
- bcopy((caddr_t)ifr->ifr_addr.sa_data,
- (caddr_t)((struct arpcom *)ifp)->ac_enaddr,
- ETHER_ADDR_LEN);
+ bcopy((caddr_t)ifr->ifr_addr.sa_data,
+ (caddr_t)((struct arpcom *)ifp)->ac_enaddr,
+ ETHER_ADDR_LEN);
/* FALLTHROUGH */
case IFT_ARCNET:
- bcopy((caddr_t)ifr->ifr_addr.sa_data,
- LLADDR(sdl), ETHER_ADDR_LEN);
+ bcopy((caddr_t)ifr->ifr_addr.sa_data,
+ LLADDR(sdl), ETHER_ADDR_LEN);
break;
default:
- return (ENODEV);
+ return (ENODEV);
}
if (ifp->if_flags & IFF_UP) {
struct ifreq ifrq;
- int s = splnet();
+ int s = splnet();
ifp->if_flags &= ~IFF_UP;
ifrq.ifr_flags = ifp->if_flags;
(*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifrq);
@@ -1359,9 +1359,9 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p)
(*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifrq);
splx(s);
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
- if (ifa->ifa_addr != NULL &&
+ if (ifa->ifa_addr != NULL &&
ifa->ifa_addr->sa_family == AF_INET)
- arp_ifinit((struct arpcom *)ifp, ifa);
+ arp_ifinit((struct arpcom *)ifp, ifa);
}
}
break;
@@ -1936,7 +1936,7 @@ sysctl_ifq(int *name, u_int namelen, void *oldp, size_t *oldlenp,
/* All sysctl names at this level are terminal. */
if (namelen != 1)
return (ENOTDIR);
-
+
switch (name[0]) {
case IFQCTL_LEN:
return (sysctl_rdint(oldp, oldlenp, newp, ifq->ifq_len));