diff options
author | 2014-01-11 04:35:52 +0000 | |
---|---|---|
committer | 2014-01-11 04:35:52 +0000 | |
commit | b2b5e59be16c5901db999da017e311c22743216c (patch) | |
tree | aa2e9152a27560a32f44f64110d18873aadf02d5 /usr.sbin/tcpdump/print-icmp.c | |
parent | Check the return value of fstat() in readmsg(). (diff) | |
download | wireguard-openbsd-b2b5e59be16c5901db999da017e311c22743216c.tar.xz wireguard-openbsd-b2b5e59be16c5901db999da017e311c22743216c.zip |
Make icmp_print() accept the length variable, which is the length of the
packet without the IP header. This is needed by the next commit that
will allow tcpdump to detect bad ICMP checksums.
Related functions like {tcp,udp,icmp6}_print() already accept this
length variable, so this change makes icmp_print() consistent with
them as well.
This commit makes no functional change to tcpdump itself.
OK florian@
Diffstat (limited to 'usr.sbin/tcpdump/print-icmp.c')
-rw-r--r-- | usr.sbin/tcpdump/print-icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-icmp.c b/usr.sbin/tcpdump/print-icmp.c index 6348b76affb..a554c0a434f 100644 --- a/usr.sbin/tcpdump/print-icmp.c +++ b/usr.sbin/tcpdump/print-icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-icmp.c,v 1.20 2009/10/27 23:59:55 deraadt Exp $ */ +/* $OpenBSD: print-icmp.c,v 1.21 2014/01/11 04:35:52 lteo Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996 @@ -165,7 +165,7 @@ struct id_rdiscovery { }; void -icmp_print(const u_char *bp, const u_char *bp2) +icmp_print(const u_char *bp, u_int length, const u_char *bp2) { const struct icmp *dp; const struct ip *ip; |