Commits

sag...@689a6050-402a-0410-94f2-e92a70836424  committed c2d259f

Properly fix proto comparison in allow_trusted

  • Participants
  • Parent commits 1c67958
  • Branches 1.5

Comments (0)

Files changed (1)

File modules/permissions/trusted.c

     
     if (proto_sp && (pv_get_spec_value(_msg, proto_sp, &pv_val) == 0)) {
 	if (pv_val.flags & PV_VAL_STR) {
-            strlower(&(pv_val.rs));
 	    proto = pv_val.rs.s;
 	} else {
 	    LM_ERR("proto pvar value is not string\n");
 	return -1;
     }
 
-    if (strcmp(proto, "udp") == 0) {
+    if (strcasecmp(proto, "udp") == 0) {
 	proto_int = PROTO_UDP;
-    } else if (strcmp(proto, "tcp") == 0) {
+    } else if (strcasecmp(proto, "tcp") == 0) {
 	proto_int = PROTO_TCP;
-    } else if (strcmp(proto, "tls") == 0) {
+    } else if (strcasecmp(proto, "tls") == 0) {
 	proto_int = PROTO_TLS;
-    } else if (strcmp(proto, "sctp") == 0) {
+    } else if (strcasecmp(proto, "sctp") == 0) {
 	proto_int = PROTO_SCTP;
     } else {
 	LM_ERR("unknown protocol %s\n", proto);