Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/fstat byte swap the inet6 ports.



details:   https://anonhg.NetBSD.org/src/rev/e45b49c5e103
branches:  trunk
changeset: 778400:e45b49c5e103
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Mar 24 21:51:23 2012 +0000

description:
byte swap the inet6 ports.

diffstat:

 usr.bin/fstat/fstat.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r d6f32a55c2bb -r e45b49c5e103 usr.bin/fstat/fstat.c
--- a/usr.bin/fstat/fstat.c     Sat Mar 24 20:28:41 2012 +0000
+++ b/usr.bin/fstat/fstat.c     Sat Mar 24 21:51:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fstat.c,v 1.95 2011/10/09 21:16:00 chs Exp $   */
+/*     $NetBSD: fstat.c,v 1.96 2012/03/24 21:51:23 christos Exp $      */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)fstat.c    8.3 (Berkeley) 5/2/95";
 #else
-__RCSID("$NetBSD: fstat.c,v 1.95 2011/10/09 21:16:00 chs Exp $");
+__RCSID("$NetBSD: fstat.c,v 1.96 2012/03/24 21:51:23 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -974,9 +974,9 @@
                                goto bad;
                        }
                        inet6_addrstr(lbuf, sizeof(lbuf), &in6pcb.in6p_laddr,
-                           in6pcb.in6p_lport);
+                           ntohs(in6pcb.in6p_lport));
                        inet6_addrstr(fbuf, sizeof(fbuf), &in6pcb.in6p_faddr,
-                           in6pcb.in6p_fport);
+                           ntohs(in6pcb.in6p_fport));
                        break;
                default:
                        break;



Home | Main Index | Thread Index | Old Index