Author: jhb
Date: Wed Aug 17 14:39:45 2011
New Revision: 224942
URL: http://svn.freebsd.org/changeset/base/224942

Log:
  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

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==============================================================================
--- head/sbin/ipfw/ipfw2.c      Wed Aug 17 14:29:33 2011        (r224941)
+++ head/sbin/ipfw/ipfw2.c      Wed Aug 17 14:39:45 2011        (r224942)
@@ -1282,6 +1282,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt
                                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)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to