diff options
-rw-r--r-- | sbin/ipsecctl/parse.y | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index 8b7e103cbc6..57f5746cb43 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.100 2006/06/07 23:02:52 hshoexer Exp $ */ +/* $OpenBSD: parse.y,v 1.101 2006/06/08 16:51:25 todd Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -496,6 +496,16 @@ host : STRING { ipa->netaddress = 1; if ((ipa->name = strdup("0.0.0.0/0")) == NULL) err(1, "host: strdup"); + + ipa->next = calloc(1, sizeof(struct ipsec_addr_wrap)); + if (ipa->next == NULL) + err(1, "host: calloc"); + + ipa->next->af = AF_INET6; + ipa->next->netaddress = 1; + if ((ipa->next->name = strdup("::/0")) == NULL) + err(1, "host: strdup"); + $$ = ipa; } | '{' host_list '}' { $$ = $2; } |