Date: Fri, 23 Jun 2017 02:42:04 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320257 - in head/contrib/ipfilter: lib tools Message-ID: <201706230242.v5N2g4Ow069230@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Fri Jun 23 02:42:04 2017 New Revision: 320257 URL: https://svnweb.freebsd.org/changeset/base/320257 Log: Replace AF_INET6 ifdefs with USE_INET6 ifdefs. This is more consistent and guaranteed to build everywhere in ipfilter. Not all of this commit can be MFCed. Some is original code while others are not. Modified: head/contrib/ipfilter/lib/familyname.c head/contrib/ipfilter/lib/printhashnode.c head/contrib/ipfilter/lib/printip.c head/contrib/ipfilter/lib/printpoolnode.c head/contrib/ipfilter/tools/ipf_y.y Modified: head/contrib/ipfilter/lib/familyname.c ============================================================================== --- head/contrib/ipfilter/lib/familyname.c Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/lib/familyname.c Fri Jun 23 02:42:04 2017 (r320257) @@ -4,7 +4,7 @@ const char *familyname(int family) { if (family == AF_INET) return "inet"; -#ifdef AF_INET6 +#ifdef USE_INET6 if (family == AF_INET6) return "inet6"; #endif Modified: head/contrib/ipfilter/lib/printhashnode.c ============================================================================== --- head/contrib/ipfilter/lib/printhashnode.c Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/lib/printhashnode.c Fri Jun 23 02:42:04 2017 (r320257) @@ -35,7 +35,7 @@ printhashnode(iph, ipep, copyfunc, opts, fields) } printf("\n"); } else if ((opts & OPT_DEBUG) != 0) { -#ifdef AF_INET6 +#ifdef USE_INET6 if (ipe.ipe_family == AF_INET6) { char buf[INET6_ADDRSTRLEN + 1]; const char *str; @@ -59,7 +59,7 @@ printhashnode(iph, ipep, copyfunc, opts, fields) } else if (ipe.ipe_family == AF_INET) { #else if (ipe.ipe_family == AF_INET) { -#endif /* AF_INET6 */ +#endif /* USE_INET6 */ PRINTF("\t%d\tAddress: %s", hv, inet_ntoa(ipe.ipe_addr.in4)); printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr); Modified: head/contrib/ipfilter/lib/printip.c ============================================================================== --- head/contrib/ipfilter/lib/printip.c Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/lib/printip.c Fri Jun 23 02:42:04 2017 (r320257) @@ -25,7 +25,7 @@ printip(family, addr) else PRINTF("%s", inet_ntoa(ipa)); } -#ifdef AF_INET6 +#ifdef USE_INET6 else if (family == AF_INET6) { char buf[INET6_ADDRSTRLEN + 1]; const char *str; Modified: head/contrib/ipfilter/lib/printpoolnode.c ============================================================================== --- head/contrib/ipfilter/lib/printpoolnode.c Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/lib/printpoolnode.c Fri Jun 23 02:42:04 2017 (r320257) @@ -33,7 +33,7 @@ printpoolnode(np, opts, fields) printmask(np->ipn_addr.adf_family, (u_32_t *)&np->ipn_mask.adf_addr); } else { -#ifdef AF_INET6 +#ifdef USE_INET6 if (np->ipn_addr.adf_family == AF_INET6) { char buf[INET6_ADDRSTRLEN + 1]; const char *str; @@ -54,9 +54,7 @@ printpoolnode(np, opts, fields) } else { PRINTF("\tAddress: family: %d\n", np->ipn_addr.adf_family); -#ifdef AF_INET6 } -#endif printmask(np->ipn_addr.adf_family, (u_32_t *)&np->ipn_mask.adf_addr); #ifdef USE_QUAD_T Modified: head/contrib/ipfilter/tools/ipf_y.y ============================================================================== --- head/contrib/ipfilter/tools/ipf_y.y Fri Jun 23 01:05:49 2017 (r320256) +++ head/contrib/ipfilter/tools/ipf_y.y Fri Jun 23 02:42:04 2017 (r320257) @@ -2303,7 +2303,7 @@ makepool(list) for (n = top, a = list; (n != NULL) && (a != NULL); a = a->al_next) { if (use_inet6 == 1) { -#ifdef AF_INET6 +#ifdef USE_INET6 n->ipn_addr.adf_family = AF_INET6; n->ipn_addr.adf_addr = a->al_i6addr; n->ipn_addr.adf_len = offsetof(addrfamily_t,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706230242.v5N2g4Ow069230>