OSDN Git Service

netfilter: nft_tunnel: no need to call htons() when dumping ports
authorXin Long <lucien.xin@gmail.com>
Fri, 13 Dec 2019 08:53:05 +0000 (16:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:42:23 +0000 (16:42 +0100)
commitbc09b25efe0d87c2b5137b959030ed943f1eae6f
tree5e5bcd954164a24ef7ea6d49052fe9fecebfd77b
parent95722ea2a194dd6933ace84188f6b2a8b987a6f4
netfilter: nft_tunnel: no need to call htons() when dumping ports

commit cf3e204a1ca5442190018a317d9ec181b4639bd6 upstream.

info->key.tp_src and tp_dst are __be16, when using nla_put_be16()
to dump them, htons() is not needed, so remove it in this patch.

Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_tunnel.c