svn commit: r286238 - head/sys/dev/ixgbe
Sean Bruno
sbruno at FreeBSD.org
Mon Aug 3 16:39:26 UTC 2015
Author: sbruno
Date: Mon Aug 3 16:39:25 2015
New Revision: 286238
URL: https://svnweb.freebsd.org/changeset/base/286238
Log:
A misplaced #endif in ixgbe_ioctl() causes interface MTU to become
zero when INET and INET6 are undefined.
PR: 162028
Differential Revision: https://reviews.freebsd.org/D3187
Submitted by: hoomanfazaeli at gmail.com pluknet
Reviewed by: erj hiren gelbius
MFC after: 2 weeks
Modified:
head/sys/dev/ixgbe/if_ix.c
Modified: head/sys/dev/ixgbe/if_ix.c
==============================================================================
--- head/sys/dev/ixgbe/if_ix.c Mon Aug 3 16:35:18 2015 (r286237)
+++ head/sys/dev/ixgbe/if_ix.c Mon Aug 3 16:39:25 2015 (r286238)
@@ -828,9 +828,9 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
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) {
@@ -843,7 +843,6 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
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.
@@ -852,11 +851,12 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
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)");
More information about the svn-src-all
mailing list