ofp-print: Do not display flow mod cookie if it is UINT64_MAX
authorSimon Horman <horms@verge.net.au>
Fri, 12 Oct 2012 00:26:29 +0000 (09:26 +0900)
committerBen Pfaff <blp@nicira.com>
Fri, 12 Oct 2012 17:18:54 +0000 (10:18 -0700)
Internally UINT64_MAX is used to denote that the cookie
should not be changed, so it seems appropriate
to omit this value when pretty printing flow mods.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-print.c

index 0970a92..8654783 100644 (file)
@@ -743,7 +743,7 @@ ofp_print_flow_mod(struct ds *s, const struct ofp_header *oh, int verbosity)
     if (ds_last(s) != ' ') {
         ds_put_char(s, ' ');
     }
-    if (fm.new_cookie != htonll(0)) {
+    if (fm.new_cookie != htonll(0) && fm.new_cookie != htonll(UINT64_MAX)) {
         ds_put_format(s, "cookie:0x%"PRIx64" ", ntohll(fm.new_cookie));
     }
     if (fm.cookie_mask != htonll(0)) {