Hide AF_INET specific ioctl handling under #ifdef INET.
MFC after: 2 months
This commit is contained in:
parent
19aa71e559
commit
edb04458d5
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_KERNEL_OPTION_HEADERS
|
#ifdef HAVE_KERNEL_OPTION_HEADERS
|
||||||
#include "opt_device_polling.h"
|
#include "opt_device_polling.h"
|
||||||
|
#include "opt_inet.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -1033,7 +1034,9 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
|||||||
{
|
{
|
||||||
struct adapter *adapter = ifp->if_softc;
|
struct adapter *adapter = ifp->if_softc;
|
||||||
struct ifreq *ifr = (struct ifreq *)data;
|
struct ifreq *ifr = (struct ifreq *)data;
|
||||||
|
#ifdef INET
|
||||||
struct ifaddr *ifa = (struct ifaddr *)data;
|
struct ifaddr *ifa = (struct ifaddr *)data;
|
||||||
|
#endif
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
if (adapter->in_detach)
|
if (adapter->in_detach)
|
||||||
@ -1041,6 +1044,7 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
|||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case SIOCSIFADDR:
|
case SIOCSIFADDR:
|
||||||
|
#ifdef INET
|
||||||
if (ifa->ifa_addr->sa_family == AF_INET) {
|
if (ifa->ifa_addr->sa_family == AF_INET) {
|
||||||
/*
|
/*
|
||||||
* XXX
|
* XXX
|
||||||
@ -1057,6 +1061,7 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
|||||||
}
|
}
|
||||||
arp_ifinit(ifp, ifa);
|
arp_ifinit(ifp, ifa);
|
||||||
} else
|
} else
|
||||||
|
#endif
|
||||||
error = ether_ioctl(ifp, command, data);
|
error = ether_ioctl(ifp, command, data);
|
||||||
break;
|
break;
|
||||||
case SIOCSIFMTU:
|
case SIOCSIFMTU:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user