From: Jarno Rajahalme Date: Wed, 4 Nov 2015 23:47:36 +0000 (-0800) Subject: upcall: Check for recirc_id in ukey_create_from_dpif_flow() X-Git-Tag: v2.5.0~350 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=994fcc5a15d32b16e249eaa97c7948a75ba370bd upcall: Check for recirc_id in ukey_create_from_dpif_flow() Filter out not only flows with recirculation actions, but also flows with non-zero recirculation id in flow key when creating ukeys from datapath flows, as such flows also depend on the recirculation context, which have been lost after a restart. Signed-off-by: Jarno Rajahalme Acked-by: Joe Stringer --- diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 245f52e69..91648f518 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -1558,7 +1558,14 @@ ukey_create_from_dpif_flow(const struct udpif *udpif, /* Check the flow actions for recirculation action. As recirculation * relies on OVS userspace internal state, we need to delete all old - * datapath flows with recirculation upon OVS restart. */ + * datapath flows with either a non-zero recirc_id in the key, or any + * recirculation actions upon OVS restart. */ + NL_ATTR_FOR_EACH_UNSAFE (a, left, flow->key, flow->key_len) { + if (nl_attr_type(a) == OVS_KEY_ATTR_RECIRC_ID + && nl_attr_get_u32(a) != 0) { + return EINVAL; + } + } NL_ATTR_FOR_EACH_UNSAFE (a, left, flow->actions, flow->actions_len) { if (nl_attr_type(a) == OVS_ACTION_ATTR_RECIRC) { return EINVAL;