diff options
author | yar <yar@FreeBSD.org> | 2007-03-14 14:38:04 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2007-03-14 14:38:04 +0000 |
commit | f78c9d73a438f0c487be5737469ab36691ba7a52 (patch) | |
tree | 4ee0d0463cf42054b27673e4f56b20ce7440ea6d | |
parent | 940ef563551bf9f7e4e82576fc4174a209d83f06 (diff) | |
download | FreeBSD-src-f78c9d73a438f0c487be5737469ab36691ba7a52.zip FreeBSD-src-f78c9d73a438f0c487be5737469ab36691ba7a52.tar.gz |
Let vlan_ioctl() pass some work on to ether_ioctl()
and so reduce code duplication a bit.
-rw-r--r-- | sys/net/if_vlan.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index e1076b3..90da454 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1326,30 +1326,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifv = ifp->if_softc; switch (cmd) { - case SIOCSIFADDR: - ifp->if_flags |= IFF_UP; - - switch (ifa->ifa_addr->sa_family) { -#ifdef INET - case AF_INET: - arp_ifinit(ifv->ifv_ifp, ifa); - break; -#endif - default: - break; - } - break; - - case SIOCGIFADDR: - { - struct sockaddr *sa; - - sa = (struct sockaddr *) &ifr->ifr_data; - bcopy(IF_LLADDR(ifp), (caddr_t)sa->sa_data, - ETHER_ADDR_LEN); - } - break; - case SIOCGIFMEDIA: VLAN_LOCK(); if (TRUNK(ifv) != NULL) { @@ -1457,7 +1433,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; default: - error = EINVAL; + error = ether_ioctl(ifp, cmd, data); } return (error); |