diff options
Diffstat (limited to 'usr.sbin/ctld/uclparse.cc')
-rw-r--r-- | usr.sbin/ctld/uclparse.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/ctld/uclparse.cc b/usr.sbin/ctld/uclparse.cc index 05cfcc8df7e7..1eb9f7736e4b 100644 --- a/usr.sbin/ctld/uclparse.cc +++ b/usr.sbin/ctld/uclparse.cc @@ -100,14 +100,14 @@ uclparse_chap_mutual(const char *ag_name, const ucl_object_t *obj) } mutual_user = ucl_object_find_key(obj, "mutual-user"); - if (!user || user->type != UCL_STRING) { + if (!mutual_user || mutual_user->type != UCL_STRING) { log_warnx("chap-mutual section in auth-group \"%s\" is missing " "\"mutual-user\" string key", ag_name); return (false); } mutual_secret = ucl_object_find_key(obj, "mutual-secret"); - if (!secret || secret->type != UCL_STRING) { + if (!mutual_secret || mutual_secret->type != UCL_STRING) { log_warnx("chap-mutual section in auth-group \"%s\" is missing " "\"mutual-secret\" string key", ag_name); return (false); @@ -165,14 +165,14 @@ uclparse_target_chap_mutual(const char *t_name, const ucl_object_t *obj) } mutual_user = ucl_object_find_key(obj, "mutual-user"); - if (!user || user->type != UCL_STRING) { + if (!mutual_user || mutual_user->type != UCL_STRING) { log_warnx("chap-mutual section in target \"%s\" is missing " "\"mutual-user\" string key", t_name); return (false); } mutual_secret = ucl_object_find_key(obj, "mutual-secret"); - if (!secret || secret->type != UCL_STRING) { + if (!mutual_secret || mutual_secret->type != UCL_STRING) { log_warnx("chap-mutual section in target \"%s\" is missing " "\"mutual-secret\" string key", t_name); return (false); @@ -570,9 +570,6 @@ uclparse_dscp(const char *group_type, const char *pg_name, return (portal_group_set_dscp(ucl_object_toint(obj))); key = ucl_object_tostring(obj); - if (strcmp(key, "0x") == 0) - return (portal_group_set_dscp(strtol(key + 2, NULL, 16))); - if (strcmp(key, "be") == 0 || strcmp(key, "cs0") == 0) portal_group_set_dscp(IPTOS_DSCP_CS0 >> 2); else if (strcmp(key, "ef") == 0) |