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

Andrey V. Elsukov ae at FreeBSD.org
Fri Nov 9 08:14:49 UTC 2018


Author: ae
Date: Fri Nov  9 08:14:47 2018
New Revision: 340277
URL: https://svnweb.freebsd.org/changeset/base/340277

Log:
  MFC r340100:
    Do not use bzero() for the O_ICMP6TYPE opcode.
  
    The buffer is already zeroed in compile_rule() function, and also it
    may contain configured F_NOT flag in o.len field. This fixes the
    filling for "not icmp6types" opcode.
  
  MFC r340175:
    Do not print "ip6" keyword in print_icmp6types() for O_ICMP6TYPE opcode.
  
    It produces incompatibility when rules listing is used again to
    restore saved ruleset, because "ip6" keyword produces separate opcode.
    The kernel already has the check and only IPv6 packets will be checked
    for matching.
  
  PR:		232939
  Approved by:	re (kib)

Modified:
  stable/12/sbin/ipfw/ipv6.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/ipfw/ipv6.c
==============================================================================
--- stable/12/sbin/ipfw/ipv6.c	Fri Nov  9 03:32:53 2018	(r340276)
+++ stable/12/sbin/ipfw/ipv6.c	Fri Nov  9 08:14:47 2018	(r340277)
@@ -143,8 +143,6 @@ fill_icmp6types(ipfw_insn_icmp6 *cmd, char *av, int cb
        uint8_t type;
 
        CHECK_LENGTH(cblen, F_INSN_SIZE(ipfw_insn_icmp6));
-
-       bzero(cmd, sizeof(*cmd));
        while (*av) {
 	       if (*av == ',')
 		       av++;
@@ -171,7 +169,7 @@ print_icmp6types(struct buf_pr *bp, ipfw_insn_u32 *cmd
 	int i, j;
 	char sep= ' ';
 
-	bprintf(bp, " ip6 icmp6types");
+	bprintf(bp, " icmp6types");
 	for (i = 0; i < 7; i++)
 		for (j=0; j < 32; ++j) {
 			if ( (cmd->d[i] & (1 << (j))) == 0)


More information about the svn-src-all mailing list