Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2014 14:51:28 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273091 - head/sys/net
Message-ID:  <201410141451.s9EEpSWn075151@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Tue Oct 14 14:51:27 2014
New Revision: 273091
URL: https://svnweb.freebsd.org/changeset/base/273091

Log:
  Add more ifdefs. SIOC*_IN6 are defined only with INET6.
  
  MFC after:	1 month
  Reported  by:	bz

Modified:
  head/sys/net/if_gif.c

Modified: head/sys/net/if_gif.c
==============================================================================
--- head/sys/net/if_gif.c	Tue Oct 14 14:41:06 2014	(r273090)
+++ head/sys/net/if_gif.c	Tue Oct 14 14:51:27 2014	(r273091)
@@ -744,7 +744,9 @@ gif_ioctl(struct ifnet *ifp, u_long cmd,
 	error = 0;
 	switch (cmd) {
 	case SIOCSIFPHYADDR:
+#ifdef INET6
 	case SIOCSIFPHYADDR_IN6:
+#endif
 		error = EINVAL;
 		switch (cmd) {
 #ifdef INET
@@ -840,8 +842,10 @@ gif_ioctl(struct ifnet *ifp, u_long cmd,
 		break;
 	case SIOCGIFPSRCADDR:
 	case SIOCGIFPDSTADDR:
+#ifdef INET6
 	case SIOCGIFPSRCADDR_IN6:
 	case SIOCGIFPDSTADDR_IN6:
+#endif
 		if (sc->gif_family == 0) {
 			error = EADDRNOTAVAIL;
 			break;
@@ -1057,7 +1061,9 @@ gif_set_tunnel(struct ifnet *ifp, struct
 	sc->gif_family = src->sa_family;
 	sc->gif_hdr = hdr;
 	GIF_WUNLOCK(sc);
+#if defined(INET) || defined(INET6)
 bad:
+#endif
 	if (error == 0 && sc->gif_family != 0)
 		ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	else



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