summaryrefslogtreecommitdiff
path: root/usr.sbin/mtrace
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-12-10 20:30:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-12-10 20:30:47 +0000
commit33c3054b18f4e1f3548b60962face634c0e44988 (patch)
tree07e4247f8f2d82779c1933d2ff5d5616564daee2 /usr.sbin/mtrace
parentf5a6bd6e1a5c0904abdfe4203aa0c0b9224efe5f (diff)
follow post-2.1 ip_off & ip_len byte orders
Diffstat (limited to 'usr.sbin/mtrace')
-rw-r--r--usr.sbin/mtrace/mtrace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/mtrace/mtrace.c b/usr.sbin/mtrace/mtrace.c
index 16f97a4ddba..a62efd2932f 100644
--- a/usr.sbin/mtrace/mtrace.c
+++ b/usr.sbin/mtrace/mtrace.c
@@ -52,7 +52,7 @@
#ifndef lint
static char rcsid[] =
- "@(#) $Id: mtrace.c,v 1.8 2001/09/05 22:32:45 deraadt Exp $";
+ "@(#) $Id: mtrace.c,v 1.9 2001/12/10 20:30:46 deraadt Exp $";
#endif
#include <netdb.h>
@@ -501,7 +501,7 @@ send_recv(dst, type, code, tries, save)
continue;
iphdrlen = ip->ip_hl << 2;
- ipdatalen = ip->ip_len;
+ ipdatalen = ntohs(ip->ip_len);
if (iphdrlen + ipdatalen != recvlen) {
fprintf(stderr,
"packet shorter (%u bytes) than hdr+data len (%u+%u)\n",
@@ -657,7 +657,7 @@ passive_mode()
continue;
iphdrlen = ip->ip_hl << 2;
- ipdatalen = ip->ip_len;
+ ipdatalen = ntohs(ip->ip_len);
if (iphdrlen + ipdatalen != recvlen) {
fprintf(stderr,
"packet shorter (%u bytes) than hdr+data len (%u+%u)\n",