From: Numan Siddique <[email protected]> This check is added to address NULL deference issue reported by coverity. br-controller also uses the lib/actions and it sets the 'tunnel_ofport' in the 'struct ovnact_encode_params' to NULL. br-controller can crash if a user uses the OVN logical action - fwd_group() even though it is not supported.
Ideally br-controller should define its own supported OVN actions as a proper fix. This patch is just a temporary fix until we add this support. Signed-off-by: Numan Siddique <[email protected]> --- lib/actions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/actions.c b/lib/actions.c index 53f4d20a9f..a2e3897016 100644 --- a/lib/actions.c +++ b/lib/actions.c @@ -4212,7 +4212,8 @@ encode_FWD_GROUP(const struct ovnact_fwd_group *fwd_group, if (fwd_group->liveness) { /* Find the openflow port number of the tunnel port */ - if (!ep->tunnel_ofport(ep->aux, port_name, &ofport)) { + if (!ep->tunnel_ofport || + !ep->tunnel_ofport(ep->aux, port_name, &ofport)) { ds_destroy(&ds); return; } -- 2.52.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
