Skip to content

Commit

Permalink
netfilter: nft_meta_bridge: Fix get NFT_META_BRI_IIFVPROTO in network…
Browse files Browse the repository at this point in the history
… byteorder

Get the vlan_proto of ingress bridge in network byteorder as userspace
expects. Otherwise this is inconsistent with NFT_META_PROTOCOL.

Fixes: 2a3a93e ("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>
  • Loading branch information
wenxu authored and Pablo Neira Ayuso committed Aug 30, 2019
1 parent de20900 commit daf1de9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/netfilter/nft_meta_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit daf1de9

Please sign in to comment.