[sr-dev] Re: [kamailio/kamailio] usrloc: check on db delete the return value of memchr (PR #3815)
Merged #3815 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3815#event-12546672427 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:49276a1f: usrloc: check on db delete the return value of memchr
Module: kamailio Branch: master Commit: 49276a1f43b1a3bf4a8d681888df964000360c79 URL: https://github.com/kamailio/kamailio/commit/49276a1f43b1a3bf4a8d681888df964000360c79 Author: Rick Barenthin Committer: Henning Westerholt Date: 2024-04-20T06:35:51+02:00 usrloc: check on db delete the return value of memchr When inserting into the database the AOR is split at the @ sign and if there is no @ sign in the AOR only the domain part is filled and the user part is left empty. But for deleting this is not done and the query failed to be executed and the AOR is not deleted. This PR add this behaviour of only comparing against the domain part if the AOR doesn't contain a @ sign. --- Modified: src/modules/usrloc/urecord.c --- Diff: https://github.com/kamailio/kamailio/commit/49276a1f43b1a3bf4a8d681888df964000360c79.diff Patch: https://github.com/kamailio/kamailio/commit/49276a1f43b1a3bf4a8d681888df964000360c79.patch --- diff --git a/src/modules/usrloc/urecord.c b/src/modules/usrloc/urecord.c index e027affc8aa..3c394a24a10 100644 --- a/src/modules/usrloc/urecord.c +++ b/src/modules/usrloc/urecord.c @@ -491,13 +491,17 @@ int db_delete_urecord(urecord_t *_r) vals[0].val.str_val.len = _r->aor.len; if(ul_use_domain) { - dom = memchr(_r->aor.s, '@', _r->aor.len); - vals[0].val.str_val.len = dom - _r->aor.s; - vals[1].type = DB1_STR; vals[1].nul = 0; - vals[1].val.str_val.s = dom + 1; - vals[1].val.str_val.len = _r->aor.s + _r->aor.len - dom - 1; + dom = memchr(_r->aor.s, '@', _r->aor.len); + if(dom == 0) { + vals[0].val.str_val.len = 0; + vals[1].val.str_val = _r->aor; + } else { + vals[0].val.str_val.len = dom - _r->aor.s; + vals[1].val.str_val.s = dom + 1; + vals[1].val.str_val.len = _r->aor.s + _r->aor.len - dom - 1; + } } if(ul_dbf.use_table(ul_dbh, _r->domain) < 0) { ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] support zero media stream for sdp parsing module (Issue #3779)
This issue is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3779#issuecomment-2067520498 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] usrloc: check on db delete the return value of memchr (PR #3815)
+2 from me -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3815#issuecomment-2066723812 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Misleading source IP of 1.0.0.127 in event routes (Issue #3817)
Thanks for the report. Yes, it should be probably changed to e.g. 127.0.0.1 or another address from this range. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3817#issuecomment-2066582128 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] usrloc: check on db delete the return value of memchr (PR #3815)
Thanks for fixing the format. If there are no more comments, it will be merged in the next days. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3815#issuecomment-2066575520 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] Misleading source IP of 1.0.0.127 in event routes (Issue #3817)
### Description Event routes that are executed without a real SIP message available use the default "fake SIP message". The fake message has a source IPv4 address of 1.0.0.127 which belongs to CloudFlare (1.0.0.0/24).. and this led us to believe that traffic is coming from CF but could not find the messages on tcpdumps or HEP exports. Had a bit of a wild goose chase there trying to find the source. I believe the original intention has been to use 127.0.0.1 loopback address but the bytes are reversed at: https://github.com/kamailio/kamailio/blob/master/src/core/fmsg.c#L78 It would be best to change this address to well ANYTHING that doesn't imply CloudFlare is pinging you -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3817 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Core parameters user_agent_header fail to take effect (Issue #3816)
For replies generated from Kamailio you need to set the server_header parameter. The user_agent_header is for Kamailio generated requests. For questions like this please contact our sr-users lists, as this bug tracker is for bugs and issues in the code. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3816#issuecomment-2066288250 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Core parameters user_agent_header fail to take effect (Issue #3816)
Closed #3816 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3816#event-12536494983 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] usrloc: check on db delete the return value of memchr (PR #3815)
@dunst0 pushed 1 commit. 542186cb67af21d18b42374c77bc5b3892c27f81 usrloc: check on db delete the return value of memchr -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3815/files/6dec3fab0ccea7407eb7edfe93586da6f381b2c4..542186cb67af21d18b42374c77bc5b3892c27f81 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org