Module Name: src
Committed By: rmind
Date: Wed Feb 19 01:43:17 UTC 2014
Modified Files:
src/usr.sbin/npf/npfctl: npf_show.c
Log Message:
npfctl_print_nat: fix the byte-order of the port.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/npf/npfctl/npf_show.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.sbin/npf/npfctl/npf_show.c
diff -u src/usr.sbin/npf/npfctl/npf_show.c:1.11 src/usr.sbin/npf/npfctl/npf_show.c:1.12
--- src/usr.sbin/npf/npfctl/npf_show.c:1.11 Wed Feb 12 01:42:50 2014
+++ src/usr.sbin/npf/npfctl/npf_show.c Wed Feb 19 01:43:16 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_show.c,v 1.11 2014/02/12 01:42:50 rmind Exp $ */
+/* $NetBSD: npf_show.c,v 1.12 2014/02/19 01:43:16 rmind Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: npf_show.c,v 1.11 2014/02/12 01:42:50 rmind Exp $");
+__RCSID("$NetBSD: npf_show.c,v 1.12 2014/02/19 01:43:16 rmind Exp $");
#include <sys/socket.h>
#include <netinet/in.h>
@@ -390,7 +390,7 @@ npfctl_print_nat(npf_conf_info_t *ctx, n
seg = npfctl_print_addrmask(alen, &addr, NPF_NO_NETMASK);
if (port) {
char *p;
- easprintf(&p, "%s port %u", seg, port);
+ easprintf(&p, "%s port %u", seg, ntohs(port));
free(seg), seg = p;
}
seg1 = seg2 = "any";