Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2013 20:40:16 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251393 - head/sys/net
Message-ID:  <201306042040.r54KeGpn062233@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Jun  4 20:40:16 2013
New Revision: 251393
URL: http://svnweb.freebsd.org/changeset/base/251393

Log:
  Fix build with both INET and INET6 disabled.

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Tue Jun  4 19:47:26 2013	(r251392)
+++ head/sys/net/if.c	Tue Jun  4 20:40:16 2013	(r251393)
@@ -654,12 +654,14 @@ if_attach_internal(struct ifnet *ifp, in
 		/* Reliably crash if used uninitialized. */
 		ifp->if_broadcastaddr = NULL;
 
+#if defined(INET) || defined(INET6)
 		/* Initialize to max value. */
 		if (ifp->if_hw_tsomax == 0)
 			ifp->if_hw_tsomax = IP_MAXPACKET;
 		KASSERT(ifp->if_hw_tsomax <= IP_MAXPACKET &&
 		    ifp->if_hw_tsomax >= IP_MAXPACKET / 8,
 		    ("%s: tsomax outside of range", __func__));
+#endif
 	}
 #ifdef VIMAGE
 	else {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306042040.r54KeGpn062233>