diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 9445ca97163b404974849e4c3edb44fca7f2f56a..471a4bb57b52719df94bdf426ee5545484403370 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -965,8 +965,7 @@ static int output_userspace(struct datapath *dp, struct sk_buff *skb, upcall.cmd = OVS_PACKET_CMD_ACTION; upcall.mru = OVS_CB(skb)->mru; - for (a = nla_data(attr), rem = nla_len(attr); rem > 0; - a = nla_next(a, &rem)) { + nla_for_each_nested(a, attr, rem) { switch (nla_type(a)) { case OVS_USERSPACE_ATTR_USERDATA: upcall.userdata = a;