From: kstailey Date: Fri, 7 Feb 1997 20:06:44 +0000 (+0000) Subject: fixed order of tests in printnat() so that it catches tcp/udp first X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=39b9245bc52fa20fc45bfe7a34f3051785ed83fb;p=openbsd fixed order of tests in printnat() so that it catches tcp/udp first --- diff --git a/sbin/ipnat/ipnat.c b/sbin/ipnat/ipnat.c index 4f9aafb1a55..80c1f9834d2 100644 --- a/sbin/ipnat/ipnat.c +++ b/sbin/ipnat/ipnat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipnat.c,v 1.8 1997/02/07 19:33:49 kstailey Exp $ */ +/* $OpenBSD: ipnat.c,v 1.9 1997/02/07 20:06:44 kstailey Exp $ */ /* * (C)opyright 1993,1994,1995 by Darren Reed. * @@ -188,12 +188,12 @@ int verbose; printf("%s", inet_ntoa(np->in_out[1])); if (np->in_port[0] || np->in_port[1]) { printf(" portmap"); - if (np->in_flags & IPN_TCP) + if (np->in_flags & IPN_TCPUDP) + printf(" tcp/udp"); + else if (np->in_flags & IPN_TCP) printf(" tcp"); else if (np->in_flags & IPN_UDP) printf(" udp"); - else if (np->in_flags & IPN_TCPUDP) - printf(" tcp/udp"); printf(" %d:%d", ntohs(np->in_port[0]), ntohs(np->in_port[1])); }