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
This commit is contained in:
John Baldwin 2011-08-17 14:39:45 +00:00
parent ad92276ece
commit e89359c21e

View File

@ -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)