diff options
author | Kevin Steves <stevesk@cvs.openbsd.org> | 2005-11-17 23:33:51 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@cvs.openbsd.org> | 2005-11-17 23:33:51 +0000 |
commit | 8cdc9ec122ec8a6c4abc13fde1aa00d75c2b405f (patch) | |
tree | 32d07e404a4d518aecc9d3e523c4e60bf8274fd0 | |
parent | f7e66be44bc982246bea1b6e028d1e0b0fad75ba (diff) |
fix byteorder for "s" and "l" formats; ok henning@ krw@
-rw-r--r-- | usr.sbin/tcpdump/print-bootp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/tcpdump/print-bootp.c b/usr.sbin/tcpdump/print-bootp.c index b4a361f99f6..472c8853e96 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: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-bootp.c,v 1.12 2002/02/19 19:39:40 millert Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/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; |