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.
This commit is contained in:
parent
3dfcef9d29
commit
43988e3f50
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user