Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

wenxu and committed by
Pablo Neira Ayuso
daf1de90 de20900f

+1 -1
+1 -1
net/bridge/netfilter/nft_meta_bridge.c
··· 53 53 goto err; 54 54 55 55 br_vlan_get_proto(br_dev, &p_proto); 56 - nft_reg_store16(dest, p_proto); 56 + nft_reg_store16(dest, htons(p_proto)); 57 57 return; 58 58 } 59 59 default: