summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-bootp.c
diff options
context:
space:
mode:
authorstevesk <stevesk@openbsd.org>2005-11-17 23:33:50 +0000
committerstevesk <stevesk@openbsd.org>2005-11-17 23:33:50 +0000
commitd96f48be039325c17b0d8561933cce84efb4d419 (patch)
tree7250517bf63990287fbd24733e7fca785b5e217e /usr.sbin/tcpdump/print-bootp.c
parentdocument "log (user)" (diff)
downloadwireguard-openbsd-d96f48be039325c17b0d8561933cce84efb4d419.tar.xz
wireguard-openbsd-d96f48be039325c17b0d8561933cce84efb4d419.zip
fix byteorder for "s" and "l" formats; ok henning@ krw@
Diffstat (limited to 'usr.sbin/tcpdump/print-bootp.c')
-rw-r--r--usr.sbin/tcpdump/print-bootp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/tcpdump/print-bootp.c b/usr.sbin/tcpdump/print-bootp.c
index d010c54a7df..1f2a26dcddb 100644
--- a/usr.sbin/tcpdump/print-bootp.c
+++ b/usr.sbin/tcpdump/print-bootp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-bootp.c,v 1.12 2002/02/19 19:39:40 millert Exp $ */
+/* $OpenBSD: print-bootp.c,v 1.13 2005/11/17 23:33:50 stevesk Exp $ */
/*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -24,7 +24,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-bootp.c,v 1.12 2002/02/19 19:39:40 millert Exp $ (LBL)";
+ "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-bootp.c,v 1.13 2005/11/17 23:33:50 stevesk Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -367,7 +367,7 @@ rfc1048_print(register const u_char *bp, register u_int length)
if (c == 'i')
printf("%s", ipaddr_string(&ul));
else
- printf("%u", ul);
+ printf("%u", ntohl(ul));
bp += sizeof(ul);
size -= sizeof(ul);
first = 0;
@@ -396,7 +396,7 @@ rfc1048_print(register const u_char *bp, register u_int length)
if (!first)
putchar(',');
memcpy((char *)&us, (char *)bp, sizeof(us));
- printf("%d", us);
+ printf("%u", ntohs(us));
bp += sizeof(us);
size -= sizeof(us);
first = 0;