From 27b83b3d9eb62a49f3945759891c5d74512e4c6c Mon Sep 17 00:00:00 2001 From: rmind Date: Wed, 19 Feb 2014 01:43:16 +0000 Subject: [PATCH] npfctl_print_nat: fix the byte-order of the port. --- usr.sbin/npf/npfctl/npf_show.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/npf/npfctl/npf_show.c b/usr.sbin/npf/npfctl/npf_show.c index 5a05caf5dcdd..145d6b426b44 100644 --- a/usr.sbin/npf/npfctl/npf_show.c +++ b/usr.sbin/npf/npfctl/npf_show.c @@ -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 -__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 #include @@ -390,7 +390,7 @@ npfctl_print_nat(npf_conf_info_t *ctx, nl_nat_t *nt) 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";