]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rlm_sigtran: fix tautological condition and inverted range check in SCCP global title...
authorAlexander Bainbridge-Sedivy <alex.bainbridge@inkbridge.io>
Wed, 13 May 2026 13:35:49 +0000 (09:35 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 27 May 2026 20:21:54 +0000 (16:21 -0400)
src/modules/rlm_sigtran/rlm_sigtran.c

index cc7a2364153f04eea534310f935350ff286f3888..7fa5cbd43ad25cb025fea67e9744196f15150f0e 100644 (file)
@@ -254,13 +254,13 @@ static int sigtran_sccp_sockaddr_from_conf(TALLOC_CTX *ctx,
 
                if (conf->gt.tt_is_set) {
                        if ((conf->gt.np_is_set && !conf->gt.es_is_set) ||
-                           (!conf->gt.np_is_set && conf->gt.np_is_set)) {
+                           (!conf->gt.np_is_set && conf->gt.es_is_set)) {
                                cf_log_err(cs, "Global title 'np' and 'es' must be "
                                              "specified together");
                                return -1;
                        }
 
-                       if (conf->gt.np) {
+                       if (conf->gt.np > 0x0f) {
                                cf_log_err(cs, "Global title 'np' must be between 0-15");
                                return -1;
                        }