Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2017 03:33:48 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r319179 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet
Message-ID:  <201705300333.v4U3XmLg065649@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Tue May 30 03:33:48 2017
New Revision: 319179
URL: https://svnweb.freebsd.org/changeset/base/319179

Log:
  MFC r318606:
  
  Refactor & compact struct i6addr_t #ifdef: remove redundant structure
  definintion when USE_INET6 is false.

Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_fil.h
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/contrib/ipfilter/netinet/ip_fil.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil.h
==============================================================================
--- stable/10/sys/contrib/ipfilter/netinet/ip_fil.h	Tue May 30 03:30:53 2017	(r319178)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_fil.h	Tue May 30 03:33:48 2017	(r319179)
@@ -143,11 +143,12 @@ typedef	int	(* lookupfunc_t) __P((struct ipf_main_soft
  * i6addr is used as a container for both IPv4 and IPv6 addresses, as well
  * as other types of objects, depending on its qualifier.
  */
-#ifdef	USE_INET6
 typedef	union	i6addr	{
 	u_32_t	i6[4];
 	struct	in_addr	in4;
+#ifdef	USE_INET6
 	struct	in6_addr in6;
+#endif
 	void	*vptr[2];
 	lookupfunc_t	lptr[2];
 	struct {
@@ -156,19 +157,6 @@ typedef	union	i6addr	{
 		int	name;
 	} i6un;
 } i6addr_t;
-#else
-typedef	union	i6addr	{
-	u_32_t	i6[4];
-	struct	in_addr	in4;
-	void	*vptr[2];
-	lookupfunc_t	lptr[2];
-	struct {
-		u_short	type;
-		u_short	subtype;
-		int	name;
-	} i6un;
-} i6addr_t;
-#endif
 
 #define in4_addr	in4.s_addr
 #define	iplookupnum	i6[1]



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