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 <bu7cher at yandex.ru>
MFC after:	5 days
This commit is contained in:
jhay 2006-09-16 06:34:30 +00:00
parent ac9152509c
commit 3f597283a3

View File

@ -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++;