svn commit: r347516 - stable/12/sbin/ipfw

Andrey V. Elsukov ae at FreeBSD.org
Mon May 13 08:26:23 UTC 2019


Author: ae
Date: Mon May 13 08:26:21 2019
New Revision: 347516
URL: https://svnweb.freebsd.org/changeset/base/347516

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/12/sbin/ipfw/ipfw2.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/ipfw/ipfw2.c
==============================================================================
--- stable/12/sbin/ipfw/ipfw2.c	Mon May 13 01:18:17 2019	(r347515)
+++ stable/12/sbin/ipfw/ipfw2.c	Mon May 13 08:26:21 2019	(r347516)
@@ -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:


More information about the svn-src-all mailing list