Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2019 08:27:53 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347517 - stable/11/sbin/ipfw
Message-ID:  <201905130827.x4D8Rr2B019388@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905130827.x4D8Rr2B019388>