summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-06-12 19:01:05 +0300
committerDavid S. Miller <davem@davemloft.net>2015-06-13 00:24:27 +0300
commit611d23c559a328ca3f84ac120c02d5a9f88c08f5 (patch)
tree6684696e8c52478d94125ddffbfcb360fbafb09b /net/core
parentb60f2f3d65de3f3e9e63855e5f5070a3fedcccba (diff)
downloadlinux-611d23c559a328ca3f84ac120c02d5a9f88c08f5.tar.xz
flow_dissector: Fix MPLS entropy label handling in flow dissector
Need to shift after masking to get label value for comparison. Fixes: b3baa0fbd02a1a9d493d8 ("mpls: Add MPLS entropy label in flow_keys") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/flow_dissector.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 77e22e4fc898..1818cdcaa9b9 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -299,8 +299,8 @@ mpls:
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,