[ovs-dev] [PATCH 05/23] nx-match: Serialize match on IP TTL even when outputting OXM.

Ben Pfaff blp at nicira.com
Sat Oct 10 04:15:26 UTC 2015


The 'oxm' parameter to nxm_put_ip() indicates whether NXM or OXM code
points should be used in cases where both exist.  It shouldn't cause
matches to be dropped entirely, since that changes the meaning, but that's
what was done here for matches on the IP (v4 or v6) TTL.  This commit
fixes the problem.

Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 lib/nx-match.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/nx-match.c b/lib/nx-match.c
index eef2c54..90636bc 100644
--- a/lib/nx-match.c
+++ b/lib/nx-match.c
@@ -817,7 +817,7 @@ nxm_put_ip(struct ofpbuf *b, const struct match *match, enum ofp_version oxm)
                   flow->nw_tos & IP_ECN_MASK);
     }
 
-    if (!oxm && match->wc.masks.nw_ttl) {
+    if (match->wc.masks.nw_ttl) {
         nxm_put_8(b, MFF_IP_TTL, oxm, flow->nw_ttl);
     }
 
-- 
2.1.3




More information about the dev mailing list