svn commit: r340278 - stable/11/sbin/ipfw
Andrey V. Elsukov
ae at FreeBSD.org
Fri Nov 9 08:16:00 UTC 2018
Author: ae
Date: Fri Nov 9 08:15:58 2018
New Revision: 340278
URL: https://svnweb.freebsd.org/changeset/base/340278
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
Modified:
stable/11/sbin/ipfw/ipv6.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sbin/ipfw/ipv6.c
==============================================================================
--- stable/11/sbin/ipfw/ipv6.c Fri Nov 9 08:14:47 2018 (r340277)
+++ stable/11/sbin/ipfw/ipv6.c Fri Nov 9 08:15:58 2018 (r340278)
@@ -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-stable-11
mailing list