Show active rules correctly if "portmap auto" is used (PR#16615 by Sergey

Svishchev)
This commit is contained in:
martti 2002-05-03 08:27:10 +00:00
parent 00ee66cd54
commit 0486c7bccc

14
dist/ipf/printnat.c vendored
View File

@ -1,4 +1,4 @@
/* $NetBSD: printnat.c,v 1.6 2002/05/02 17:11:38 martti Exp $ */
/* $NetBSD: printnat.c,v 1.7 2002/05/03 08:27:10 martti Exp $ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
@ -444,6 +444,12 @@ int opts;
printf("\n\tip modulous %d", np->in_pmax);
} else if (np->in_pmin || np->in_pmax) {
printf(" portmap");
if ((np->in_flags & IPN_TCPUDP) == IPN_TCPUDP)
printf(" tcp/udp");
else if (np->in_flags & IPN_TCP)
printf(" tcp");
else if (np->in_flags & IPN_UDP)
printf(" udp");
if (np->in_flags & IPN_AUTOPORTMAP) {
printf(" auto");
if (opts & OPT_DEBUG)
@ -452,12 +458,6 @@ int opts;
ntohs(np->in_pmax),
np->in_ippip, np->in_ppip);
} else {
if ((np->in_flags & IPN_TCPUDP) == IPN_TCPUDP)
printf(" tcp/udp");
else if (np->in_flags & IPN_TCP)
printf(" tcp");
else if (np->in_flags & IPN_UDP)
printf(" udp");
printf(" %d:%d", ntohs(np->in_pmin),
ntohs(np->in_pmax));
}