diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-12-12 09:41:52 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-12-12 09:41:52 +0000 |
commit | 3be35291865c2af4807367cdcdc4c6e8a45d2536 (patch) | |
tree | efe28e57bf8b106586ae6e9a42a9700378403eac /sbin/ipsecctl/parse.y | |
parent | 140310e25c738c19b050af8b7cf1486f3424ac5b (diff) |
Correctly copy interface names; fixes breakage noticed by naddy@
ok naddy@
cvs: ----------------------------------------------------------------------
Diffstat (limited to 'sbin/ipsecctl/parse.y')
-rw-r--r-- | sbin/ipsecctl/parse.y | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index 5d71d468a66..c11f21570fc 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.46 2005/12/06 14:27:57 markus Exp $ */ +/* $OpenBSD: parse.y,v 1.47 2005/12/12 09:41:51 hshoexer Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1217,6 +1217,8 @@ ifa_lookup(const char *ifa_name) if (ipa == NULL) err(1, "ifa_lookup: calloc"); memcpy(ipa, &p->addr, sizeof(struct ipsec_addr_wrap)); + if ((ipa->name = strdup(p->addr.name)) == NULL) + err(1, "ifa_lookup: strdup"); break; } |