From e7f2ec536477c07fd73b6c768d0be3e286a3d027 Mon Sep 17 00:00:00 2001 From: John Hay Date: Sat, 16 Sep 2006 06:34:30 +0000 Subject: [PATCH] Use bzero() to clear the whole ipfw_insn_icmp6 structure in fill_icmp6types(), otherwise this command ipfw add allow ipv6-icmp from any to 2002::1 icmp6types 1,2,128,129 turns into icmp6types 1,2,32,33,34,...94,95,128,129 PR: 102422 (part 1) Submitted by: Andrey V. Elsukov MFC after: 5 days --- sbin/ipfw/ipfw2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 00c38002f07e..a0f1646f1e40 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -1206,7 +1206,7 @@ fill_icmp6types(ipfw_insn_icmp6 *cmd, char *av) { uint8_t type; - cmd->d[0] = 0; + bzero(cmd, sizeof(*cmd)); while (*av) { if (*av == ',') av++;