From 0486c7bcccc8f413a1899683d017205529d7f6fa Mon Sep 17 00:00:00 2001 From: martti Date: Fri, 3 May 2002 08:27:10 +0000 Subject: [PATCH] Show active rules correctly if "portmap auto" is used (PR#16615 by Sergey Svishchev) --- dist/ipf/printnat.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/ipf/printnat.c b/dist/ipf/printnat.c index a99d780ad345..1f960fcc12bb 100644 --- a/dist/ipf/printnat.c +++ b/dist/ipf/printnat.c @@ -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)); }