Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2018 20:05:50 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340100 - head/sbin/ipfw
Message-ID:  <201811032005.wA3K5oJI071067@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Sat Nov  3 20:05:50 2018
New Revision: 340100
URL: https://svnweb.freebsd.org/changeset/base/340100

Log:
  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.
  
  PR:		232939
  MFC after:	3 days

Modified:
  head/sbin/ipfw/ipv6.c

Modified: head/sbin/ipfw/ipv6.c
==============================================================================
--- head/sbin/ipfw/ipv6.c	Sat Nov  3 19:31:11 2018	(r340099)
+++ head/sbin/ipfw/ipv6.c	Sat Nov  3 20:05:50 2018	(r340100)
@@ -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++;



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