int len = 0;
ds_put_cstr(string, "actions=");
+ if (!actions_len) {
+ ds_put_cstr(string, "drop");
+ }
while (actions_len > 0) {
if (len) {
ds_put_cstr(string, ",");
ds_put_format(string, "n_packets=%"PRIu64", ",
ntohll(fs->packet_count));
ds_put_format(string, "n_bytes=%"PRIu64", ", ntohll(fs->byte_count));
- ds_put_format(string, "idle_timeout=%"PRIu16",",
- ntohs(fs->idle_timeout));
- ds_put_format(string, "hard_timeout=%"PRIu16",",
- ntohs(fs->hard_timeout));
+ if (fs->idle_timeout != htons(OFP_FLOW_PERMANENT)) {
+ ds_put_format(string, "idle_timeout=%"PRIu16",",
+ ntohs(fs->idle_timeout));
+ }
+ if (fs->hard_timeout != htons(OFP_FLOW_PERMANENT)) {
+ ds_put_format(string, "hard_timeout=%"PRIu16",",
+ ntohs(fs->hard_timeout));
+ }
ofp_print_match(string, &fs->match, verbosity);
ofp_print_actions(string, fs->actions, length - sizeof *fs);
ds_put_char(string, '\n');