[sr-dev] git:5.6:ebda78c9: sipdump: use the right flag to parse ipv6
Daniel-Constantin Mierla
miconda at gmail.com
Sat Sep 17 10:23:57 CEST 2022
Module: kamailio
Branch: 5.6
Commit: ebda78c92c21770af1a32afc2930740b80d73fd3
URL: https://github.com/kamailio/kamailio/commit/ebda78c92c21770af1a32afc2930740b80d73fd3
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-09-17T10:23:38+02:00
sipdump: use the right flag to parse ipv6
(cherry picked from commit 9a15781f4804ef6620fad5a09ff2e9aacae871cb)
---
Modified: src/modules/sipdump/sipdump_pcap.c
---
Diff: https://github.com/kamailio/kamailio/commit/ebda78c92c21770af1a32afc2930740b80d73fd3.diff
Patch: https://github.com/kamailio/kamailio/commit/ebda78c92c21770af1a32afc2930740b80d73fd3.patch
---
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));
More information about the sr-dev
mailing list