Hide AF_INET specific ioctl handling under #ifdef INET.

Reviewed by:	kmacy
MFC after:	2 months
This commit is contained in:
Bjoern A. Zeeb 2008-11-06 10:17:57 +00:00
parent f0176c5c6f
commit 34627f9384
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184714

View File

@ -1931,7 +1931,9 @@ static int
cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data)
{
struct port_info *p = ifp->if_softc;
#ifdef INET
struct ifaddr *ifa = (struct ifaddr *)data;
#endif
struct ifreq *ifr = (struct ifreq *)data;
int flags, error = 0, reinit = 0;
uint32_t mask;
@ -1944,6 +1946,7 @@ cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data)
error = cxgb_set_mtu(p, ifr->ifr_mtu);
break;
case SIOCSIFADDR:
#ifdef INET
if (ifa->ifa_addr->sa_family == AF_INET) {
ifp->if_flags |= IFF_UP;
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
@ -1953,6 +1956,7 @@ cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data)
}
arp_ifinit(ifp, ifa);
} else
#endif
error = ether_ioctl(ifp, command, data);
break;
case SIOCSIFFLAGS: