diff options
author | wenxu <wenxu@ucloud.cn> | 2019-08-28 18:02:33 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-08-30 03:49:04 +0300 |
commit | daf1de9078792a4d60e36aa7ecf3aadca65277c2 (patch) | |
tree | c923fab91f5699105b0bcbeba769f00b6819b3be /net/bridge/netfilter/nft_meta_bridge.c | |
parent | de20900fbe1c4fd36de25a7a5a43223254ecf0d0 (diff) | |
download | linux-daf1de9078792a4d60e36aa7ecf3aadca65277c2.tar.xz |
netfilter: nft_meta_bridge: Fix get NFT_META_BRI_IIFVPROTO in network byteorder
Get the vlan_proto of ingress bridge in network byteorder as userspace
expects. Otherwise this is inconsistent with NFT_META_PROTOCOL.
Fixes: 2a3a93ef0ba5 ("netfilter: nft_meta_bridge: Add NFT_META_BRI_IIFVPROTO support")
Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/bridge/netfilter/nft_meta_bridge.c')
-rw-r--r-- | net/bridge/netfilter/nft_meta_bridge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/netfilter/nft_meta_bridge.c b/net/bridge/netfilter/nft_meta_bridge.c index 1804e867f715..7c9e92b2f806 100644 --- a/net/bridge/netfilter/nft_meta_bridge.c +++ b/net/bridge/netfilter/nft_meta_bridge.c @@ -53,7 +53,7 @@ static void nft_meta_bridge_get_eval(const struct nft_expr *expr, goto err; br_vlan_get_proto(br_dev, &p_proto); - nft_reg_store16(dest, p_proto); + nft_reg_store16(dest, htons(p_proto)); return; } default: |