action.output.len = htons(sizeof action);
if (in_port == out_port || out_port == DROP) {
/* Set up a flow to drop packets. */
- ofproto_add_flow(ofproto, flow, 0, UINT16_MAX, NULL, 0, NULL, 0);
+ ofproto_add_flow(ofproto, flow, 0, UINT16_MAX, NULL, 0, NULL, -1);
} else if (out_port != FLOOD) {
/* The output port is known, so add a new flow. */
action.output.port = htons(out_port);
- ofproto_add_flow(ofproto, flow, 0, UINT16_MAX, &action, 1, payload, 0);
+ ofproto_add_flow(ofproto, flow, 0, UINT16_MAX,
+ &action, 1, payload, -1);
} else {
/* We don't know that MAC. Send along the packet without setting up a
* flow. */
action.output.len = htons(sizeof action);
if (in_port == out_port || out_port == DROP) {
/* Set up a flow to drop packets. */
- ofproto_add_flow(ofproto, flow, 0, UINT16_MAX, NULL, 0, NULL, 0);
+ ofproto_add_flow(ofproto, flow, 0, UINT16_MAX, NULL, 0, NULL, -1);
} else if (out_port != FLOOD) {
/* The output port is known, so add a new flow. */
action.output.port = htons(out_port);
- ofproto_add_flow(ofproto, flow, 0, UINT16_MAX, &action, 1, payload, 0);
+ ofproto_add_flow(ofproto, flow, 0, UINT16_MAX,
+ &action, 1, payload, -1);
} else {
/* We don't know that MAC. Send along the packet without setting up a
* flow. */
rule = xmalloc(sizeof *rule);
cls_rule_from_flow(&rule->cr, flow, wildcards, priority);
- rule->idle_timeout = idle_timeout ? idle_timeout : 5; /* XXX */
+ rule->idle_timeout = idle_timeout >= 0 ? idle_timeout : 5; /* XXX */
rule->hard_timeout = 0; /* XXX */
rule->used = rule->created = time_msec();
rule->packet_count = 0;