Skip to content

Commit

Permalink
dpif: Fix crash in format_odp_actions() due to NULL actions.
Browse files Browse the repository at this point in the history
When flow_get fails (in this case flow does not exist) simply log
the key part of the get and erase the rest of the flow because it
is invalid.

Verified the fix by doing ovs-ofctl del-flows when traffic is running.

2014-10-18T20:12:13.785Z|00011|dpif(revalidator20)|WARN|system@ovs-system: failed to flow_get (No such file or directory) dp_hash(0),recirc_id(0),skb_priority(0),in_port(2),skb_mark(0),eth(src=00:13:72:0b:52:fa,dst=00:14:72:0b:52:fa),eth_type(0x0800),ipv4(src=10.0.0.164,dst=11.0.0.164,proto=6,tos=0,ttl=4,frag=no),tcp(src=1651,dst=6095),tcp_flags(ack), packets:0, bytes:0, used:never

Signed-off-by: Madhu Challa <challa@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
mchalla authored and blp committed Oct 21, 2014
1 parent f73dc82 commit 72d5216
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dpif.c
Expand Up @@ -1155,11 +1155,11 @@ dpif_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops)
struct dpif_flow_get *get = &op->u.flow_get;

COVERAGE_INC(dpif_flow_get);
log_flow_get_message(dpif, get, error);

if (error) {
memset(get->flow, 0, sizeof *get->flow);
}
log_flow_get_message(dpif, get, error);

break;
}

Expand Down

0 comments on commit 72d5216

Please sign in to comment.