Module: kamailio
Branch: master
Commit: f2c78a09fb25717c31bb27d85009984289f2f77e
URL:
https://github.com/kamailio/kamailio/commit/f2c78a09fb25717c31bb27d85009984…
Author: Denis Prusov <supervisor.81(a)gmail.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2023-01-12T08:49:05+01:00
cdp: make ip_proto parameter case insensitive
---
Modified: src/modules/cdp/receiver.c
Modified: src/modules/cdp/tcp_accept.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f2c78a09fb25717c31bb27d85009984…
Patch:
https://github.com/kamailio/kamailio/commit/f2c78a09fb25717c31bb27d85009984…
---
diff --git a/src/modules/cdp/receiver.c b/src/modules/cdp/receiver.c
index 6f0a3deaf4..7098f848a0 100644
--- a/src/modules/cdp/receiver.c
+++ b/src/modules/cdp/receiver.c
@@ -853,7 +853,7 @@ int peer_connect(peer *p)
int error;
memset (&hints, 0, sizeof(hints));
- if ((p->proto.len) && (strcmp(p->proto.s,"SCTP")==0)){
+ if ((p->proto.len) && (strncasecmp(p->proto.s,"SCTP",4)==0)){
hints.ai_protocol = IPPROTO_SCTP;
}else{
hints.ai_protocol = IPPROTO_TCP;
diff --git a/src/modules/cdp/tcp_accept.c b/src/modules/cdp/tcp_accept.c
index 73e14b52ad..276a7a976f 100644
--- a/src/modules/cdp/tcp_accept.c
+++ b/src/modules/cdp/tcp_accept.c
@@ -88,7 +88,7 @@ int create_socket(str ip_proto,int listen_port,str bind_to,unsigned int
*sock)
unsigned int option;
memset (&hints, 0, sizeof(hints));
- if ((ip_proto.len) && (strcmp(ip_proto.s,"SCTP")==0)){
+ if ((ip_proto.len) && (strncasecmp(ip_proto.s,"SCTP",4)==0)){
hints.ai_protocol = IPPROTO_SCTP;
}else{
hints.ai_protocol = IPPROTO_TCP;