提交 611d23c5 编写于 作者: T Tom Herbert 提交者: David S. Miller

flow_dissector: Fix MPLS entropy label handling in flow dissector

Need to shift after masking to get label value for comparison.

Fixes: b3baa0fb ("mpls: Add MPLS entropy label in flow_keys")
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NTom Herbert <tom@herbertland.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b60f2f3d
......@@ -299,8 +299,8 @@ bool __skb_flow_dissect(const struct sk_buff *skb,
if (!hdr)
return false;
if ((ntohl(hdr[0].entry) & MPLS_LS_LABEL_MASK) ==
MPLS_LABEL_ENTROPY) {
if ((ntohl(hdr[0].entry) & MPLS_LS_LABEL_MASK) >>
MPLS_LS_LABEL_SHIFT == MPLS_LABEL_ENTROPY) {
if (skb_flow_dissector_uses_key(flow_dissector,
FLOW_DISSECTOR_KEY_MPLS_ENTROPY)) {
key_keyid = skb_flow_dissector_target(flow_dissector,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册