summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-06-02 15:03:40 +0200
committerDavid Sommerseth <davids@redhat.com>2012-06-07 14:00:46 +0200
commite656b995b44fab0b8290c6c2a4a73079b3f9813b (patch)
treed41036a195a0373123f1c1eaa82917143983c0bc
parent97235cc7077630004e11d6d44862c3bb7e49a40e (diff)
downloadopenvpn-e656b995b44fab0b8290c6c2a4a73079b3f9813b.tar.gz
openvpn-e656b995b44fab0b8290c6c2a4a73079b3f9813b.tar.xz
openvpn-e656b995b44fab0b8290c6c2a4a73079b3f9813b.zip
Add the name of the context where option is not allowed to the error message.
Changes Options error: option 'dhcp-option' cannot be used in this context to P:Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS]) Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1338642223-20324-6-git-send-email-arne@rfc2549.org URL: http://article.gmane.org/gmane.network.openvpn.devel/6646 Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r--src/openvpn/options.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 2f70839..10636ea 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -4017,10 +4017,11 @@ void options_string_import (struct options *options,
#if P2MP
-#define VERIFY_PERMISSION(mask) { if (!verify_permission(p[0], (mask), permission_mask, option_types_found, msglevel)) goto err; }
+#define VERIFY_PERMISSION(mask) { if (!verify_permission(p[0], file, (mask), permission_mask, option_types_found, msglevel)) goto err; }
static bool
verify_permission (const char *name,
+ const char* file,
const unsigned int type,
const unsigned int allowed,
unsigned int *found,
@@ -4028,7 +4029,7 @@ verify_permission (const char *name,
{
if (!(type & allowed))
{
- msg (msglevel, "option '%s' cannot be used in this context", name);
+ msg (msglevel, "option '%s' cannot be used in this context (%s)", name, file);
return false;
}
else