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 99e5943c562e8ee67b0bf649eec41acad4a2c48d..05c6f5467b49c61254b161186319a54a1d654be4 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;