2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

odp-execute: Fix possible segfault.

In current code, the odp_execute_actions() function does not check
the value of "userspace" function pointer before invoking it.  This
patch adds a check for it.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Alex Wang
2013-10-18 17:27:51 -07:00
committed by Ben Pfaff
parent a7a2d006ba
commit c51876c3af

View File

@@ -200,7 +200,9 @@ odp_execute_actions(void *dp, struct ofpbuf *packet, struct flow *key,
break;
case OVS_ACTION_ATTR_USERSPACE: {
userspace(dp, packet, key, a);
if (userspace) {
userspace(dp, packet, key, a);
}
break;
}