From 7179ae751dd8ae4fd9cbbd5e3be417f8995f6bc0 Mon Sep 17 00:00:00 2001 From: sbruno Date: Fri, 4 Sep 2015 15:34:27 +0000 Subject: MFC r286238 A misplaced #endif in ixgbe_ioctl() causes interface MTU to become zero when INET and INET6 are undefined. PR: 162028 Submitted by: hoomanfazaeli@gmail.com pluknet --- sys/dev/ixgbe/if_ix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 9b405c0..c2bf573 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -770,9 +770,9 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) struct ifreq *ifr = (struct ifreq *) data; #if defined(INET) || defined(INET6) struct ifaddr *ifa = (struct ifaddr *)data; - bool avoid_reset = FALSE; #endif int error = 0; + bool avoid_reset = FALSE; switch (command) { @@ -785,7 +785,6 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) if (ifa->ifa_addr->sa_family == AF_INET6) avoid_reset = TRUE; #endif -#if defined(INET) || defined(INET6) /* ** Calling init results in link renegotiation, ** so we avoid doing it when possible. @@ -794,11 +793,12 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) ixgbe_init(adapter); +#if defined(INET) if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); +#endif } else error = ether_ioctl(ifp, command, data); -#endif break; case SIOCSIFMTU: IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); -- cgit v1.1