[sr-dev] [kamailio/kamailio] IPV6 Contact Parsed as V4 notation (#2742)

chappo notifications at github.com
Sun May 23 06:21:24 CEST 2021


### Description

Saving contact location details for IPV6 client via UDP results in a IPv4 notation. Changing to TCP correctly saves the IPV6 notation and functions correctly. 

### Troubleshooting

Tested on 4.4 / 4.5 & Devel. Default and custom configuration

#### Reproduction

Using default configuration the contact location for a IPv6 UDP client is saved as a shortened v4 style address. Using TCP with exact same configuration the client is correctly saved in IPV6 notation.


#### Debugging Data

May 23 03:29:50 localhost /usr/local/sbin/kamailio[32104]: DEBUG: <core> [core/udp_server.c:493]: udp_rcv_loop(): received on udp socket: (106/100/528) [[REGISTER sip:voip.domain.com SIP/2.0 0D  0A Via: SIP/2.0/UDP 32.1.128.4:52692;rport;branch=z9hG4bKPj]]

May 23 03:29:50 localhost /usr/local/sbin/kamailio[32104]: DEBUG: {1 8093 REGISTER nTrprYhDHmupMBiLT6fuYVwvy31d0YPB} <core> [core/socket_info.c:641]: grep_sock_info(): checking if host==us: 39==33 && [2001:8004:13C1:7751:7999:6FB5:216D:A4A8] == [2400:8907:0:0:F03C:92FF:FE22:XXXX]

#### Log Messages

[syslog.log](https://github.com/kamailio/kamailio/files/6527523/syslog.log)


#### SIP Traffic

![IPV6TCP-Issue](https://user-images.githubusercontent.com/1019075/119247055-466fad80-bbb9-11eb-90b7-1a42f4a0cc6c.png)
![IPV6UDP-Issue](https://user-images.githubusercontent.com/1019075/119247057-496a9e00-bbb9-11eb-92d3-fed71109d009.png)

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

version: kamailio 5.5.0 (x86_64/linux) ef765d
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: ef765d
compiled on 03:53:39 May 23 2021 with gcc 8.3.0

version: kamailio 5.5.0 (x86_64/linux) ef765d
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: ef765d
compiled on 04:15:07 May 23 2021 with gcc 8.3.0



* **Operating System**:

4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2742
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210522/33a4ca99/attachment.htm>


More information about the sr-dev mailing list