1 |
+ |
/* $MidnightBSD$ */ |
2 |
|
/* |
3 |
|
* Copyright (c) 2002-2003 Luigi Rizzo |
4 |
|
* Copyright (c) 1996 Alex Nash, Paul Traina, Poul-Henning Kamp |
18 |
|
* |
19 |
|
* NEW command line interface for IP firewall facility |
20 |
|
* |
21 |
< |
* $MidnightBSD$ |
21 |
> |
* $FreeBSD: stable/10/sbin/ipfw/ipv6.c 318271 2017-05-14 13:59:40Z marius $ |
22 |
|
* |
23 |
|
* ipv6 support |
24 |
|
*/ |
339 |
|
{ |
340 |
|
int len = 0; |
341 |
|
struct in6_addr *d = &(cmd->addr6); |
342 |
+ |
char *oav; |
343 |
|
/* |
344 |
|
* Needed for multiple address. |
345 |
|
* Note d[1] points to struct in6_add r mask6 of cmd |
377 |
|
return (1); |
378 |
|
} |
379 |
|
|
380 |
< |
av = strdup(av); |
380 |
> |
oav = av = strdup(av); |
381 |
|
while (av) { |
382 |
|
/* |
383 |
|
* After the address we can have '/' indicating a mask, |
453 |
|
if (len + 1 > F_LEN_MASK) |
454 |
|
errx(EX_DATAERR, "address list too long"); |
455 |
|
cmd->o.len |= len+1; |
456 |
< |
free(av); |
456 |
> |
free(oav); |
457 |
|
return (1); |
458 |
|
} |
459 |
|
|