Author: ae
Date: Mon May 13 08:27:52 2019
New Revision: 347517
URL: https://svnweb.freebsd.org/changeset/base/347517

Log:
  MFC r346885:
    Handle HAVE_PROTO flag and print "proto" keyword for O_IP4 and O_IP6
    opcodes when it is needed.
    This should fix the problem, when printed by `ipfw show` rule can not
    be added due to missing "proto" keyword.

Modified:
  stable/11/sbin/ipfw/ipfw2.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/ipfw/ipfw2.c
==============================================================================
--- stable/11/sbin/ipfw/ipfw2.c Mon May 13 08:26:21 2019        (r347516)
+++ stable/11/sbin/ipfw/ipfw2.c Mon May 13 08:27:52 2019        (r347517)
@@ -1701,9 +1701,13 @@ print_instruction(struct buf_pr *bp, const struct form
                    IPFW_TLV_STATE_NAME));
                break;
        case O_IP6:
+               if (state->flags & HAVE_PROTO)
+                       bprintf(bp, " proto");
                bprintf(bp, " ip6");
                break;
        case O_IP4:
+               if (state->flags & HAVE_PROTO)
+                       bprintf(bp, " proto");
                bprintf(bp, " ip4");
                break;
        case O_ICMP6TYPE:
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to