aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipsec.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2018-08-26 12:54:41 +0200
committerAnders Broman <a.broman58@gmail.com>2018-08-30 04:06:36 +0000
commit28524f1abf848dc0d59150756c6acd384fc6130e (patch)
tree6f7cbc07ba8a47ea23fa217cfe9adbea09edff2c /epan/dissectors/packet-ipsec.c
parentd1749f7c0299c3a4e76d8c5e79265eab6ad7e019 (diff)
ESP: improve IPv6 address matching
Current IPv6 address expansion function has trouble with certain classes of addresses, returning errors for valid addresses. The expression to determine address validity is based on an unknown assumption, now replaced by one without false negatives. Bug: 15056 Change-Id: Ic52f8e944f86a2b4d6838846795735df77cba56d Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-on: https://code.wireshark.org/review/29290 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ipsec.c')
-rw-r--r--epan/dissectors/packet-ipsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c
index cf46c00e4d..deee94e22c 100644
--- a/epan/dissectors/packet-ipsec.c
+++ b/epan/dissectors/packet-ipsec.c
@@ -729,7 +729,7 @@ get_full_ipv6_addr(char* ipv6_addr_expanded, char *ipv6_addr)
}
if(suffix_len < IPSEC_STRLEN_IPV6)
- return (prefix_len - prefix_remaining);
+ return (int) strlen(ipv6_addr) - suffix_cpt - prefix_remaining;
else
return (int) strlen(ipv6_addr) - suffix_cpt;
}