Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 2019 03:07:28 +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-12@freebsd.org
Subject:   svn commit: r354111 - in stable: 11/contrib/ipfilter/tools 12/contrib/ipfilter/tools
Message-ID:  <201910260307.x9Q37SQf042302@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sat Oct 26 03:07:28 2019
New Revision: 354111
URL: https://svnweb.freebsd.org/changeset/base/354111

Log:
  MFC r352738:
  
  Teach the ippool parser about address families. This is a precursor
  to implementing IPv6 support within ippool which requires reworking
  radix_ipf.c.

Modified:
  stable/12/contrib/ipfilter/tools/ippool_y.y
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/contrib/ipfilter/tools/ippool_y.y
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/contrib/ipfilter/tools/ippool_y.y
==============================================================================
--- stable/12/contrib/ipfilter/tools/ippool_y.y	Fri Oct 25 22:39:26 2019	(r354110)
+++ stable/12/contrib/ipfilter/tools/ippool_y.y	Sat Oct 26 03:07:28 2019	(r354111)
@@ -309,11 +309,27 @@ range:	addrmask			{ $$ = calloc(1, sizeof(*$$));
 					  $$->ipn_info = 0;
 					  $$->ipn_addr = $1[0];
 					  $$->ipn_mask = $1[1];
+#ifdef USE_INET6
+					  if (use_inet6)
+						$$->ipn_addr.adf_family =
+							AF_INET6;
+					  else
+#endif
+						$$->ipn_addr.adf_family =
+							AF_INET;
 					}
 	| '!' addrmask			{ $$ = calloc(1, sizeof(*$$));
 					  $$->ipn_info = 1;
 					  $$->ipn_addr = $2[0];
 					  $$->ipn_mask = $2[1];
+#ifdef USE_INET6
+					  if (use_inet6)
+						$$->ipn_addr.adf_family =
+							AF_INET6;
+					  else
+#endif
+						$$->ipn_addr.adf_family =
+							AF_INET;
 					}
 	| YY_STR			{ $$ = add_poolhosts($1);
 					  free($1);



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