Module: kamailio
Branch: master
Commit: 9a15781f4804ef6620fad5a09ff2e9aacae871cb
URL:
https://github.com/kamailio/kamailio/commit/9a15781f4804ef6620fad5a09ff2e9a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-17T10:22:22+02:00
sipdump: use the right flag to parse ipv6
---
Modified: src/modules/sipdump/sipdump_pcap.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9a15781f4804ef6620fad5a09ff2e9a…
Patch:
https://github.com/kamailio/kamailio/commit/9a15781f4804ef6620fad5a09ff2e9a…
---
diff --git a/src/modules/sipdump/sipdump_pcap.c b/src/modules/sipdump/sipdump_pcap.c
index e808ff23fe..0db2697790 100644
--- a/src/modules/sipdump/sipdump_pcap.c
+++ b/src/modules/sipdump/sipdump_pcap.c
@@ -198,8 +198,8 @@ void sipdump_write_pcap(FILE *fs, sipdump_data_t *spd)
return;
}
memcpy(&v_pcap_ipv6_header.ip6_src, &ip6addr, sizeof(struct in6_addr));
- if (inet_pton(AF_INET, spd->dst_ip.s, &ip6addr) != 1) {
- LM_ERR("failed to parse IPv4 address %s\n", spd->dst_ip.s);
+ if (inet_pton(AF_INET6, spd->dst_ip.s, &ip6addr) != 1) {
+ LM_ERR("failed to parse IPv6 address %s\n", spd->dst_ip.s);
return;
}
memcpy(&v_pcap_ipv6_header.ip6_dst, &ip6addr, sizeof(struct in6_addr));