From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<dan.carpenter@oracle.com>
Subject: [PATCH net-next 1/2] flow_dissector: Fix MPLS entropy label handling in flow dissector
Date: Fri, 12 Jun 2015 09:01:05 -0700 [thread overview]
Message-ID: <1434124866-3881537-2-git-send-email-tom@herbertland.com> (raw)
In-Reply-To: <1434124866-3881537-1-git-send-email-tom@herbertland.com>
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>
---
net/core/flow_dissector.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 77e22e4..1818cdc 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,
--
1.8.1
next prev parent reply other threads:[~2015-06-12 16:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 16:01 [PATCH net-next 0/2] flow_dissector: Fix MPLS parsing and add ext hdr support Tom Herbert
2015-06-12 16:01 ` Tom Herbert [this message]
2015-06-12 16:01 ` [PATCH net-next 2/2] flow_dissector: add support for dst, hop-by-hop and routing ext hdrs Tom Herbert
2015-06-13 1:27 ` Alexei Starovoitov
2015-06-13 1:37 ` Eric Dumazet
2015-06-13 1:50 ` Alexei Starovoitov
2015-06-13 2:11 ` Eric Dumazet
2015-06-13 2:15 ` Alexei Starovoitov
2015-06-13 2:31 ` [PATCH net-next] flow_dissector: fix ipv6 " Eric Dumazet
2015-06-13 2:40 ` Tom Herbert
2015-06-13 4:59 ` David Miller
2015-06-12 21:24 ` [PATCH net-next 0/2] flow_dissector: Fix MPLS parsing and add ext hdr support David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434124866-3881537-2-git-send-email-tom@herbertland.com \
--to=tom@herbertland.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).