ofp-util: Fix normalization of IP TOS bits.
authorJean Tourrilhes <jt@hpl.hp.com>
Thu, 28 Oct 2010 16:56:37 +0000 (09:56 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 28 Oct 2010 16:56:52 +0000 (09:56 -0700)
If the packet is not IP, you probably want to also wildcard the ToS.

lib/ofp-util.c

index 99e5943..05c6f54 100644 (file)
@@ -711,7 +711,8 @@ actions_next(struct actions_iterator *iter)
 void
 normalize_match(struct ofp_match *m)
 {
-    enum { OFPFW_NW = OFPFW_NW_SRC_MASK | OFPFW_NW_DST_MASK | OFPFW_NW_PROTO };
+    enum { OFPFW_NW = (OFPFW_NW_SRC_MASK | OFPFW_NW_DST_MASK | OFPFW_NW_PROTO
+                       | OFPFW_NW_TOS) };
     enum { OFPFW_TP = OFPFW_TP_SRC | OFPFW_TP_DST };
     uint32_t wc;