diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2003-08-08 08:47:00 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2003-08-08 08:47:00 +0000 |
commit | 76f930123a070f9cacf50c8d395178e366619a61 (patch) | |
tree | 2ebd4cd6db383a567eaba5b5d8ccb1ac9a60099a /sbin/isakmpd/isakmp_doi.c | |
parent | 2b99a3e3e559e5c31cdfb26655fd55e1821cc2b4 (diff) |
Be more careful when using constant_lookup() in messages. Pointed out by
Jean-Francois Dive, although I opted for a slightly different patch.
Diffstat (limited to 'sbin/isakmpd/isakmp_doi.c')
-rw-r--r-- | sbin/isakmpd/isakmp_doi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/isakmpd/isakmp_doi.c b/sbin/isakmpd/isakmp_doi.c index 399669c5c95..abd012e6b6a 100644 --- a/sbin/isakmpd/isakmp_doi.c +++ b/sbin/isakmpd/isakmp_doi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isakmp_doi.c,v 1.15 2003/06/03 14:28:16 ho Exp $ */ +/* $OpenBSD: isakmp_doi.c,v 1.16 2003/08/08 08:46:59 ho Exp $ */ /* $EOM: isakmp_doi.c,v 1.42 2000/09/12 16:29:41 ho Exp $ */ /* @@ -228,6 +228,7 @@ static int isakmp_responder (struct message *msg) { struct payload *p; + char *tag; switch (msg->exchange->type) { @@ -235,10 +236,11 @@ isakmp_responder (struct message *msg) for (p = TAILQ_FIRST (&msg->payload[ISAKMP_PAYLOAD_NOTIFY]); p; p = TAILQ_NEXT (p, link)) { + tag = constant_lookup (isakmp_notify_cst, + GET_ISAKMP_NOTIFY_MSG_TYPE (p->p)); LOG_DBG ((LOG_EXCHANGE, 10, "isakmp_responder: got NOTIFY of type %s, ignoring", - constant_lookup (isakmp_notify_cst, - GET_ISAKMP_NOTIFY_MSG_TYPE (p->p)))); + tag ? tag : "<unknown>")); p->flags |= PL_MARK; } |