Don't unset the SA tag set by ipsec_sa_tag in ipsec_sa_iface.
authortobhe <tobhe@openbsd.org>
Wed, 20 Dec 2023 00:34:13 +0000 (00:34 +0000)
committertobhe <tobhe@openbsd.org>
Wed, 20 Dec 2023 00:34:13 +0000 (00:34 +0000)
Fixes SA tagging and a possible leak.

from markus@

sbin/isakmpd/ipsec.c

index 08a90ce..14bc6c4 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec.c,v 1.153 2023/08/07 04:01:29 dlg Exp $      */
+/* $OpenBSD: ipsec.c,v 1.154 2023/12/20 00:34:13 tobhe Exp $    */
 /* $EOM: ipsec.c,v 1.143 2000/12/11 23:57:42 niklas Exp $       */
 
 /*
@@ -393,8 +393,6 @@ ipsec_sa_iface(struct exchange *exchange, struct sa *sa, struct sa *isakmp_sa)
        char *section, *value;
        const char *errstr = NULL;
 
-       sa->tag = NULL;
-
        if (exchange->name == NULL ||
            (section = exchange->name) == NULL ||
            (value = conf_get_str(section, "Interface")) == NULL)