ofproto/trace fails to parse the 'frag' in the ipv4 field due to a
bug in odp-util.c.  This commit fixes the bug.

Reported-by: Jacob Cherkas <[email protected]>
Signed-off-by: Alex Wang <[email protected]>
---
 lib/odp-util.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/odp-util.c b/lib/odp-util.c
index b82edb7..2a71bb2 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -2425,7 +2425,11 @@ scan_frag(const char *s, uint8_t *key, uint8_t *mask)
 
         *key = frag_type;
         if (mask) {
-            *mask = UINT8_MAX;
+            if (ovs_scan(s + len, "/%"SCNi8"%n", mask, &n)) {
+                len += n;
+            } else {
+                *mask = UINT8_MAX;
+            }
         }
         return len;
     }
-- 
1.7.9.5

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to