summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorJoe Stringer <joe@ovn.org>2017-07-31 16:54:21 -0700
committerJoe Stringer <joe@ovn.org>2017-08-07 11:40:52 -0700
commit55f854b9d51edcbccf4ae1655855dddd1d9ec1fe (patch)
treea14997b15e99a04fc81c07d7ff575cb4d7056ac0 /ofproto
parentcf62c335821aab25cc1458569c582a3a0cf6a4ce (diff)
downloadopenvswitch-55f854b9d51edcbccf4ae1655855dddd1d9ec1fe.tar.gz
ofproto-dpif-upcall: Fix action attr iteration.
This calls is operating on messages generated by the datapath. If a datapath implementation sends improperly formatted netlink attributes, then it's possible for a revalidator thread to end up trapped in an infinite loop iterating across the actions attributes. Rather than using the UNSAFE variation of this iterator, use the regular version. Fixes: e672ff9b4d22 ("ofproto-dpif: Restore metadata and registers on recirculation.") Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif-upcall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 97997ab38..ddcfc9337 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1655,7 +1655,7 @@ ukey_create_from_dpif_flow(const struct udpif *udpif,
return EINVAL;
}
}
- NL_ATTR_FOR_EACH_UNSAFE (a, left, flow->actions, flow->actions_len) {
+ NL_ATTR_FOR_EACH (a, left, flow->actions, flow->actions_len) {
if (nl_attr_type(a) == OVS_ACTION_ATTR_RECIRC) {
return EINVAL;
}