summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-ipsec.c
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2010-04-06 16:01:57 +0000
committerjsg <jsg@openbsd.org>2010-04-06 16:01:57 +0000
commitacb63ff2e1f4fe8746769e153e472054575a19ca (patch)
tree46ca37b80f3342f96a944b29c5e64ec351f5a17c /usr.sbin/tcpdump/print-ipsec.c
parentA fix for the PCI-X check so that this is only tested on controllers (diff)
downloadwireguard-openbsd-acb63ff2e1f4fe8746769e153e472054575a19ca.tar.xz
wireguard-openbsd-acb63ff2e1f4fe8746769e153e472054575a19ca.zip
Add support for decoding MLDv2 initially from tcpdump.org via FreeBSD,
cleaned up to be less gross after some suggestions from stsp. ok stsp@
Diffstat (limited to 'usr.sbin/tcpdump/print-ipsec.c')
-rw-r--r--usr.sbin/tcpdump/print-ipsec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-ipsec.c b/usr.sbin/tcpdump/print-ipsec.c
index 5e332fd5658..5e8eea70d26 100644
--- a/usr.sbin/tcpdump/print-ipsec.c
+++ b/usr.sbin/tcpdump/print-ipsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ipsec.c,v 1.15 2009/11/11 13:23:01 jsg Exp $ */
+/* $OpenBSD: print-ipsec.c,v 1.16 2010/04/06 16:01:57 jsg Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
@@ -190,7 +190,7 @@ esp_decrypt (const u_char *bp, u_int len, const u_char *bp2)
icmp_print(data, bp2);
break;
case IPPROTO_ICMPV6:
- icmp6_print(data, bp2);
+ icmp6_print(data, len, bp2);
break;
default:
printf("ip-proto-%d %d", nh, len);
@@ -302,7 +302,8 @@ ah_print (register const u_char *bp, register u_int len,
break;
case IPPROTO_ICMPV6:
- icmp6_print(bp + pl_len, (const u_char *) ip);
+ icmp6_print(bp + pl_len, len - pl_len,
+ (const u_char *) ip);
break;
case IPPROTO_TCP: