diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-19 23:34:05 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-19 23:34:05 +0200 |
commit | fe2e4b6961259012908df919b285c371bc0c557f (patch) | |
tree | b55242b09c149949612935a938794a6ff994cc70 /src/shared/firewall-util.c | |
parent | tree-wide: drop alloca() in loop (diff) | |
download | systemd-fe2e4b6961259012908df919b285c371bc0c557f.tar.xz systemd-fe2e4b6961259012908df919b285c371bc0c557f.zip |
tree-wide: use htobe{32,16}() instead of hton{l,s}()
Diffstat (limited to '')
-rw-r--r-- | src/shared/firewall-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |