Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.sbin/tcpdump Pull up revision 1.8 (requested by ito...



details:   https://anonhg.NetBSD.org/src/rev/88c2c78124a7
branches:  netbsd-1-5
changeset: 493112:88c2c78124a7
user:      he <he%NetBSD.org@localhost>
date:      Thu Jun 06 17:10:37 2002 +0000

description:
Pull up revision 1.8 (requested by itojun):
  Fix endian mistake in DHCP printing.  Fixes PR#15512.

diffstat:

 usr.sbin/tcpdump/print-bootp.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 940a23ab404c -r 88c2c78124a7 usr.sbin/tcpdump/print-bootp.c
--- a/usr.sbin/tcpdump/print-bootp.c    Thu Jun 06 17:08:33 2002 +0000
+++ b/usr.sbin/tcpdump/print-bootp.c    Thu Jun 06 17:10:37 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print-bootp.c,v 1.6.8.1 2000/10/17 19:50:31 tv Exp $   */
+/*     $NetBSD: print-bootp.c,v 1.6.8.2 2002/06/06 17:10:37 he Exp $   */
 
 /*
  * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -28,7 +28,7 @@
 static const char rcsid[] =
     "@(#) Header: print-bootp.c,v 1.45 97/06/15 13:20:28 leres Exp  (LBL)";
 #else
-__RCSID("$NetBSD: print-bootp.c,v 1.6.8.1 2000/10/17 19:50:31 tv Exp $");
+__RCSID("$NetBSD: print-bootp.c,v 1.6.8.2 2002/06/06 17:10:37 he Exp $");
 #endif
 #endif
 
@@ -351,7 +351,7 @@
                                if (c == 'i')
                                        printf("%s", ipaddr_string(&ul));
                                else
-                                       printf("%u", ul);
+                                       printf("%u", ntohl(ul));
                                bp += sizeof(ul);
                                size -= sizeof(ul);
                                first = 0;
@@ -364,7 +364,7 @@
                                if (!first)
                                        putchar(',');
                                memcpy((char *)&us, (char *)bp, sizeof(us));
-                               printf("%d", us);
+                               printf("%d", ntohs(us));
                                bp += sizeof(us);
                                size -= sizeof(us);
                                first = 0;



Home | Main Index | Thread Index | Old Index