From e89359c21e3b223fdba6a75004fbe6d138e2f5c2 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 17 Aug 2011 14:39:45 +0000 Subject: [PATCH] Fix a regression where a rule containing a source port option after a destination IP would incorrectly display the source port as a destination port. Reviewed by: luigi Approved by: re (kib) MFC after: 1 week --- sbin/ipfw/ipfw2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index e259f5ec8091..e389e99f81ab 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -1282,6 +1282,8 @@ show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth) HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP | HAVE_IP, 0); case O_IP_SRCPORT: + if (flags & HAVE_DSTIP) + flags |= HAVE_IP; show_prerequisites(&flags, HAVE_PROTO | HAVE_SRCIP, 0); if ((cmd->len & F_OR) && !or_block)