From fe2e4b6961259012908df919b285c371bc0c557f Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 20 Jun 2019 06:34:05 +0900 Subject: tree-wide: use htobe{32,16}() instead of hton{l,s}() --- src/shared/firewall-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared/firewall-util.c') diff --git a/src/shared/firewall-util.c b/src/shared/firewall-util.c index cba52fb419..87bc3f76fe 100644 --- a/src/shared/firewall-util.c +++ b/src/shared/firewall-util.c @@ -266,9 +266,9 @@ int fw_add_local_dnat( mr->range[0].flags = NF_NAT_RANGE_PROTO_SPECIFIED|NF_NAT_RANGE_MAP_IPS; mr->range[0].min_ip = mr->range[0].max_ip = remote->in.s_addr; if (protocol == IPPROTO_TCP) - mr->range[0].min.tcp.port = mr->range[0].max.tcp.port = htons(remote_port); + mr->range[0].min.tcp.port = mr->range[0].max.tcp.port = htobe16(remote_port); else - mr->range[0].min.udp.port = mr->range[0].max.udp.port = htons(remote_port); + mr->range[0].min.udp.port = mr->range[0].max.udp.port = htobe16(remote_port); mask = alloca0(sz); memset(mask, 0xFF, sz); -- cgit v1.2.3