From e48e530b44f9d8a1dc40fc11f394eecaffc10e9e Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 9 Oct 2013 14:09:08 +0200 Subject: [PATCH] starter: Reject connections having both 'ah' and 'esp' keywords set We currently don't support mixed proposals or bundles, so don't create the illusion we would. --- src/starter/args.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/starter/args.c b/src/starter/args.c index 42deb8639..f5a617eaa 100644 --- a/src/starter/args.c +++ b/src/starter/args.c @@ -295,6 +295,15 @@ bool assign_arg(kw_token_t token, kw_token_t first, kw_list_t *kw, char *base, return FALSE; } + if (token == KW_ESP || token == KW_AH) + { + if (*seen & (SEEN_KW(KW_ESP, first) | SEEN_KW(KW_AH, first))) + { + DBG1(DBG_APP, "# can't have both 'ah' and 'esp' options"); + return FALSE; + } + } + /* set flag that this argument has been seen */ *seen |= SEEN_KW(token, first);