* re: mpls: Add MPLS entropy label in flow_keys
@ 2015-06-10 15:53 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-06-10 15:53 UTC (permalink / raw)
To: kernel-janitors
Hello Tom Herbert,
The patch b3baa0fbd02a: "mpls: Add MPLS entropy label in flow_keys"
from Jun 4, 2015, leads to the following static checker warning:
net/core/flow_dissector.c:303 __skb_flow_dissect()
warn: masked condition '(() & 4294963200) = 7' is always false.
net/core/flow_dissector.c
299 if (!hdr)
300 return false;
301
302 if ((ntohl(hdr[0].entry) & MPLS_LS_LABEL_MASK) =
303 MPLS_LABEL_ENTROPY) {
#define MPLS_LS_LABEL_MASK 0xFFFFF000
#define MPLS_LABEL_ENTROPY 7 /* RFC6790 */
This can never be true. Not sure what was intended.
304 if (skb_flow_dissector_uses_key(flow_dissector,
305 FLOW_DISSECTOR_KEY_MPLS_ENTROPY)) {
306 key_keyid = skb_flow_dissector_target(flow_dissector,
307 FLOW_DISSECTOR_KEY_MPLS_ENTROPY,
308 target_container);
309 key_keyid->keyid = hdr[1].entry &
310 htonl(MPLS_LS_LABEL_MASK);
311 }
312
313 key_basic->n_proto = proto;
314 key_basic->ip_proto = ip_proto;
315 key_control->thoff = (u16)nhoff;
316
317 return true;
318 }
319
320 return true;
321 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-10 15:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 15:53 mpls: Add MPLS entropy label in flow_keys Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox