Hide AF_INET specific ioctl handling under #ifdef INET.

MFC after:	2 months
This commit is contained in:
bz 2008-11-06 11:11:25 +00:00
parent c2d5d6f6fe
commit d3cda91959

View File

@ -34,6 +34,7 @@
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
#include "opt_inet.h"
#endif
#include <sys/param.h>
@ -802,7 +803,9 @@ igb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
{
struct adapter *adapter = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
#ifdef INET
struct ifaddr *ifa = (struct ifaddr *)data;
#endif
int error = 0;
if (adapter->in_detach)
@ -810,6 +813,7 @@ igb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
switch (command) {
case SIOCSIFADDR:
#ifdef INET
if (ifa->ifa_addr->sa_family == AF_INET) {
/*
* XXX
@ -826,6 +830,7 @@ igb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
arp_ifinit(ifp, ifa);
} else
#endif
error = ether_ioctl(ifp, command, data);
break;
case SIOCSIFMTU: