### Description
Hello,
I have faced an issue when mhomed working well only for udp destinations, and I believe that it is a bug.
I have kamailio behind NAT with two network interfaces and I make a call from a softphone to kamailio and change $rd on kamailio side.
If kamailio forward call to the UDP destination, mhomed option chooses the correct Via and the correct interface for sending. But if the destination is tls, mhomed chooses first described listen interface from the config file (as described in the documentation.
#### The example
So in my example when I call to sip:111@kamailio_ip kamailio going to send this call to $rd="1.1.1.1" and set Via and Record-Route to 10.0.0.32 (it is ok, because IP route to 1.1.1.1 via 10.0.0.32)
when I call to sip:1111@kamailio_ip kamailio going to send this call to $rd="192.168.10.100:5061;transport=tls" BUT set Via and Record-Route to 10.0.0.32 (this is wrong because IP route to 192.168.10.100 is 192.168.10.145), but if in config file the first listen interface is 192.168.10.145, kamailio sends Via correct.
#### Networking
<img width="743" alt="image" src="https://user-images.githubusercontent.com/1487709/170417427-573f4038-b214-4…">
<img width="511" alt="image" src="https://user-images.githubusercontent.com/1487709/170417453-0a3925bf-bab4-4…">
#### Kamailio config
```
auto_aliases=yes
mhomed=1
tcp_connection_match=1 # I have tried with and without this option
listen=udp:10.0.0.32:5060
listen=tls:10.0.0.32:5061
listen=udp:192.168.10.145:5060
listen=tls:192.168.10.145:5061
.....
modparam("rr", "enable_full_lr", 1)
modparam("rr", "append_fromtag", 1)
#modparam("rr", "enable_double_rr", 2) # I have tried with and without this option
.....
# routing
if $rU == "111" {
$rd="1.1.1.1";
} else {
$rd="192.168.10.100:5061;transport=tls";
}
route(RELAY);
```
#### Reproduction
I have created a testing stand with almost default kamailio config so I can give full ssh access if you need it.
I just call from linphone to sip:111@server_ip and sip:1111@server_ip
#### SIP Traffic
<img width="554" alt="image" src="https://user-images.githubusercontent.com/1487709/170420217-882d236b-243f-4…">
```
INVITE sip:111@1.1.1.1 SIP/2.0
Record-Route: <sip:10.0.0.32;lr=on;ftag=GRIfZymtj;nat=yes>
Via: SIP/2.0/UDP 10.0.0.32;branch=z9hG4bKc662.d4fa02b9991c45869263fc4359af8d84.0
Via: SIP/2.0/UDP 10.5.7.0:52360;received=210.1.88.115;branch=z9hG4bK.mH58YeIkv;rport=35775
From: <sip:akam@10.5.7.0>;tag=GRIfZymtj
To: sip:111@130.61.43.152
CSeq: 20 INVITE
Call-ID: FR3BLskG9-
Max-Forwards: 69
Supported: replaces, outbound, gruu
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE
Content-Type: application/sdp
Content-Length: 613
```
<img width="584" alt="image" src="https://user-images.githubusercontent.com/1487709/170420360-a7889e57-b072-4…">
```
INVITE sip:1111@192.168.10.100:5061;transport=tls SIP/2.0
Record-Route: <sip:10.0.0.32:5061;transport=tls;r2=on;lr=on;ftag=cIRc7nj00;nat=yes>
Record-Route: <sip:10.0.0.32;r2=on;lr=on;ftag=cIRc7nj00;nat=yes>
Via: SIP/2.0/TLS 10.0.0.32:5061;branch=z9hG4bK6a2.4ff69c3e304e238936a5528da681cd49.0
Via: SIP/2.0/UDP 10.5.7.0:52360;received=210.1.88.115;branch=z9hG4bK.BPohOzqtI;rport=35775
From: <sip:akam@10.5.7.0>;tag=cIRc7nj00
To: sip:1111@130.61.43.152
CSeq: 20 INVITE
Call-ID: 40PEbKneY0
```
### Additional Information
```
root@mhomed-tls:/etc/kamailio# kamailio -v
version: kamailio 5.5.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 9.3.0
```
* **Operating System**:
```
Ubuntu 20.04.4 LTS
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3124
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3124(a)github.com>
Input ik,ck keys for add_sa() function are not zero terminated that cause
- des3_ede encryption key expansion possible buffer overflow.
Also:
- sha1 authentication key expansion has been corrected.
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [X] Commit message has the format required by CONTRIBUTING guide
- [ X] Commits are split per component (core, individual modules, libs, utils, ...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [X] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [X] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3121
-- Commit Summary --
* ims_ipsec_pcscf: ik and ck keys expansion fixes
-- File Changes --
M src/modules/ims_ipsec_pcscf/ipsec.c (50)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3121.patchhttps://github.com/kamailio/kamailio/pull/3121.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3121
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3121(a)github.com>
Module: kamailio
Branch: master
Commit: 6e7b6cfabba6774627f942d7f02e1adf62bf7797
URL: https://github.com/kamailio/kamailio/commit/6e7b6cfabba6774627f942d7f02e1ad…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-24T12:21:53+02:00
auth_identity: docs - type for accept_pem_certs param
---
Modified: src/modules/auth_identity/doc/auth_identity_params.xml
---
Diff: https://github.com/kamailio/kamailio/commit/6e7b6cfabba6774627f942d7f02e1ad…
Patch: https://github.com/kamailio/kamailio/commit/6e7b6cfabba6774627f942d7f02e1ad…
---
diff --git a/src/modules/auth_identity/doc/auth_identity_params.xml b/src/modules/auth_identity/doc/auth_identity_params.xml
index a252bbed6b..aefb49cdd0 100644
--- a/src/modules/auth_identity/doc/auth_identity_params.xml
+++ b/src/modules/auth_identity/doc/auth_identity_params.xml
@@ -190,11 +190,11 @@ modparam("auth_identity","cainfo_path","/etc/ssl/certs/ca-certificates.crt")
</section>
<section id="accept_pem_certs">
- <title><varname>accept_pem_certs</varname> ([0|1])</title>
+ <title><varname>accept_pem_certs</varname> (int)</title>
<para>Note: this parameter is for verifier service.</para>
<para>
Enables the acquired certificate processing if it is in PEM
- format.
+ format. Value can be 0 or 1.
</para>
<para>
This parameter is optional. The default value is "0".