Module: kamailio
Branch: 5.0
Commit: 6d3c7ba97ef57cb10ae478a1f39ee9da818d827e
URL: https://github.com/kamailio/kamailio/commit/6d3c7ba97ef57cb10ae478a1f39ee9d…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-06-10T22:46:43+02:00
core: dns name to IP conversion - actually stop processing in error case
(cherry picked from commit 55d115e255b1d87121922f689b93870b84e1b2b4)
---
Modified: src/core/resolve.h
---
Diff: https://github.com/kamailio/kamailio/commit/6d3c7ba97ef57cb10ae478a1f39ee9d…
Patch: https://github.com/kamailio/kamailio/commit/6d3c7ba97ef57cb10ae478a1f39ee9d…
---
diff --git a/src/core/resolve.h b/src/core/resolve.h
index 30cce19581..1946d25081 100644
--- a/src/core/resolve.h
+++ b/src/core/resolve.h
@@ -232,6 +232,7 @@ static inline struct ip_addr* str2ip(str* st)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
+ return 0;
}
s=(unsigned char*)st->s;
@@ -288,6 +289,7 @@ static inline struct ip_addr* str2ip6(str* st)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
+ return 0;
}
/* init */
if ((st->len) && (st->s[0]=='[')){
Module: kamailio
Branch: 5.1
Commit: 2f63caf7ac87c1eca9c6f4150dc7418fa9f4fc35
URL: https://github.com/kamailio/kamailio/commit/2f63caf7ac87c1eca9c6f4150dc7418…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-06-10T22:46:15+02:00
core: dns name to IP conversion - actually stop processing in error case
(cherry picked from commit 55d115e255b1d87121922f689b93870b84e1b2b4)
---
Modified: src/core/resolve.h
---
Diff: https://github.com/kamailio/kamailio/commit/2f63caf7ac87c1eca9c6f4150dc7418…
Patch: https://github.com/kamailio/kamailio/commit/2f63caf7ac87c1eca9c6f4150dc7418…
---
diff --git a/src/core/resolve.h b/src/core/resolve.h
index 30cce19581..1946d25081 100644
--- a/src/core/resolve.h
+++ b/src/core/resolve.h
@@ -232,6 +232,7 @@ static inline struct ip_addr* str2ip(str* st)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
+ return 0;
}
s=(unsigned char*)st->s;
@@ -288,6 +289,7 @@ static inline struct ip_addr* str2ip6(str* st)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
+ return 0;
}
/* init */
if ((st->len) && (st->s[0]=='[')){
Module: kamailio
Branch: master
Commit: 55d115e255b1d87121922f689b93870b84e1b2b4
URL: https://github.com/kamailio/kamailio/commit/55d115e255b1d87121922f689b93870…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-06-10T22:39:35+02:00
core: dns name to IP conversion - actually stop processing in error case
---
Modified: src/core/resolve.h
---
Diff: https://github.com/kamailio/kamailio/commit/55d115e255b1d87121922f689b93870…
Patch: https://github.com/kamailio/kamailio/commit/55d115e255b1d87121922f689b93870…
---
diff --git a/src/core/resolve.h b/src/core/resolve.h
index e0089d0a19..6b1e6cff24 100644
--- a/src/core/resolve.h
+++ b/src/core/resolve.h
@@ -226,6 +226,7 @@ static inline struct ip_addr* str2ip(str* st)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
+ return 0;
}
s=(unsigned char*)st->s;
@@ -280,6 +281,7 @@ static inline struct ip_addr* str2ip6(str* st)
/* just in case that e.g. the VIA parser get confused */
if(unlikely(!st->s || st->len <= 0)) {
LM_ERR("invalid name, no conversion to IP address possible\n");
+ return 0;
}
/* init */
if ((st->len) && (st->s[0]=='[')){
Module: kamailio
Branch: master
Commit: dd4dc5361ae97b743c202360723df3cacac3259f
URL: https://github.com/kamailio/kamailio/commit/dd4dc5361ae97b743c202360723df3c…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-06-09T00:58:54+02:00
core: udp server - remove deactivated functionality from 2008, not valid anymore
Remove decaticated functionality related zero terminated SIP messages in UPD server.
15 years ago this was a bug, but now with binary payloads its not valid anymore.
No change in functionality.
---
Modified: src/core/udp_server.c
---
Diff: https://github.com/kamailio/kamailio/commit/dd4dc5361ae97b743c202360723df3c…
Patch: https://github.com/kamailio/kamailio/commit/dd4dc5361ae97b743c202360723df3c…
---
diff --git a/src/core/udp_server.c b/src/core/udp_server.c
index def3ac1861..862bed174d 100644
--- a/src/core/udp_server.c
+++ b/src/core/udp_server.c
@@ -515,19 +515,6 @@ int udp_rcv_loop()
continue;
}
}
-/* historically, zero-terminated packets indicated a bug in clients
- * that calculated wrongly packet length and included string-terminating
- * zero; today clients exist with legitimate binary payloads and we
- * shall not check for zero-terminated payloads
- */
-#ifdef TRASH_ZEROTERMINATED_PACKETS
- if (buf[len-1]==0) {
- tmp=ip_addr2a(&ri.src_ip);
- LM_WARN("upstream bug - 0-terminated packet from %s %d\n",
- tmp, htons(ri.src_port));
- len--;
- }
-#endif
#endif
#ifdef DBG_MSG_QA
if (!dbg_msg_qa(buf, len)) {