Module Name: src
Committed By: christos
Date: Sat Mar 24 21:51:23 UTC 2012
Modified Files:
src/usr.bin/fstat: fstat.c
Log Message:
byte swap the inet6 ports.
To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/fstat/fstat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/fstat/fstat.c
diff -u src/usr.bin/fstat/fstat.c:1.95 src/usr.bin/fstat/fstat.c:1.96
--- src/usr.bin/fstat/fstat.c:1.95 Sun Oct 9 17:16:00 2011
+++ src/usr.bin/fstat/fstat.c Sat Mar 24 17:51:23 2012
@@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#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 @@ socktrans(struct socket *sock, int i)
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;