re: mpls: Add MPLS entropy label in flow_keys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux