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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user