Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2019 08:26:22 +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-12@freebsd.org
Subject:   svn commit: r347516 - stable/12/sbin/ipfw
Message-ID:  <201905130826.x4D8QMSt019273@repo.freebsd.org>

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



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