Skip to content

Commit

Permalink
sipdump: make ipv6 addresses without square brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Sep 16, 2022
1 parent 95e0fe8 commit ac711cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/sipdump/sipdump_mod.c
Expand Up @@ -226,8 +226,9 @@ int ki_sipdump_send(sip_msg_t *msg, str *stag)
isd.tag = *stag;
isd.protoid = msg->rcv.proto;
isd.afid = msg->rcv.src_ip.af;
isd.src_ip.len = ip_addr2sbufz(&msg->rcv.src_ip, srcip_buf,
isd.src_ip.len = ip_addr2sbuf(&msg->rcv.src_ip, srcip_buf,
IP_ADDR_MAX_STRZ_SIZE);
srcip_buf[isd.src_ip.len] = 0;
isd.src_ip.s = srcip_buf;
isd.src_port = msg->rcv.src_port;
if(msg->rcv.bind_address==NULL
Expand Down Expand Up @@ -340,8 +341,9 @@ int sipdump_msg_received(sr_event_param_t *evp)
isd.protoid = evp->rcv->proto;
isd.afid = (evp->rcv->bind_address!=NULL
&& evp->rcv->bind_address->address.af==AF_INET6)?AF_INET6:AF_INET;
isd.src_ip.len = ip_addr2sbufz(&evp->rcv->src_ip, srcip_buf,
isd.src_ip.len = ip_addr2sbuf(&evp->rcv->src_ip, srcip_buf,
IP_ADDR_MAX_STRZ_SIZE);
srcip_buf[isd.src_ip.len] = '\0';
isd.src_ip.s = srcip_buf;
isd.src_port = evp->rcv->src_port;
if(evp->rcv->bind_address==NULL
Expand Down

0 comments on commit ac711cf

Please sign in to comment.