Skip to content

Commit daf1de9

Browse files
wenxuummakynes
authored andcommitted
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: 2a3a93e ("netfilter: nft_meta_bridge: Add NFT_META_BRI_IIFVPROTO support") Signed-off-by: wenxu <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent de20900 commit daf1de9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bridge/netfilter/nft_meta_bridge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void nft_meta_bridge_get_eval(const struct nft_expr *expr,
5353
goto err;
5454

5555
br_vlan_get_proto(br_dev, &p_proto);
56-
nft_reg_store16(dest, p_proto);
56+
nft_reg_store16(dest, htons(p_proto));
5757
return;
5858
}
5959
default:

0 commit comments

Comments
 (0)