ofproto: Add "actions=" to drop action in "ovs-appctl bridge/dump-flows".
authorJustin Pettit <jpettit@nicira.com>
Thu, 17 Jan 2013 08:31:20 +0000 (00:31 -0800)
committerJustin Pettit <jpettit@nicira.com>
Thu, 17 Jan 2013 08:31:20 +0000 (00:31 -0800)
The function flow_stats_ds() did its own formatting when there were no
actions, but this didn't include "action=".  There's actually no reason
to special-case this, since ofpact_format() properly handles actions
with a zero length and prints it properly.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
ofproto/ofproto.c

index ddf51f8..918b9b4 100644 (file)
@@ -2809,11 +2809,7 @@ flow_stats_ds(struct rule *rule, struct ds *results)
     ds_put_format(results, "n_bytes=%"PRIu64", ", byte_count);
     cls_rule_format(&rule->cr, results);
     ds_put_char(results, ',');
-    if (rule->ofpacts_len > 0) {
-        ofpacts_format(rule->ofpacts, rule->ofpacts_len, results);
-    } else {
-        ds_put_cstr(results, "drop");
-    }
+    ofpacts_format(rule->ofpacts, rule->ofpacts_len, results);
     ds_put_cstr(results, "\n");
 }