On Tue, Oct 7, 2025 at 2:07 PM Ales Musil <[email protected]> wrote:
> The garp_rarp node attempted to get ecmp_nexthop table through
> the txn pointer which might be null. This didn't cause any crash
> as the pointer was never dereferenced. Remove the table lookup
> completely as the table wasn't used for anything within the node.
>
> lib/ovsdb-idl.c:4184:17: runtime error: member access within null pointer
> of type 'struct ovsdb_idl_txn'
> ovsdb_idl_txn_get_idl /workspace/ovn/ovs/lib/ovsdb-idl.c:4184:17
> en_garp_rarp_run /workspace/ovn/controller/ovn-controller.c:5604:38
> engine_recompute /workspace/ovn/lib/inc-proc-eng.c:444:33
> engine_compute /workspace/ovn/lib/inc-proc-eng.c:487:17
> engine_run_node /workspace/ovn/lib/inc-proc-eng.c:546:14
> engine_run /workspace/ovn/lib/inc-proc-eng.c:575:9
> main /workspace/ovn/controller/ovn-controller.c:7507:21
>
> Fixes: 05527bd6ccdb ("controller: Extract garp_rarp to engine node.")
> Signed-off-by: Ales Musil <[email protected]>
> ---
>
>
Ah, this patch didn't include the removal of "ecmp_nh_table"
from "struct garp_rarp_ctx_in". I will take care of it in v2/merge.
controller/ovn-controller.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index ae76c8b22..9f8444c10 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -5598,21 +5598,15 @@ en_garp_rarp_run(struct engine_node *node, void
> *data_)
> engine_get_input("SB_mac_binding", node),
> "lport_ip");
>
> - struct ovsdb_idl_txn *ovnsb_idl_txn =
> engine_get_context()->ovnsb_idl_txn;
> -
> - const struct sbrec_ecmp_nexthop_table *ecmp_nh_table =
> -
> sbrec_ecmp_nexthop_table_get(ovsdb_idl_txn_get_idl(ovnsb_idl_txn));
> -
> struct ed_type_runtime_data *rt_data =
> engine_get_input_data("runtime_data", node);
>
> struct garp_rarp_ctx_in r_ctx_in = {
> - .ovnsb_idl_txn = ovnsb_idl_txn,
> + .ovnsb_idl_txn = engine_get_context()->ovnsb_idl_txn,
> .cfg = cfg,
> .sbrec_port_binding_by_datapath = sbrec_port_binding_by_datapath,
> .sbrec_port_binding_by_name = sbrec_port_binding_by_name,
> .sbrec_mac_binding_by_lport_ip = sbrec_mac_binding_by_lport_ip,
> - .ecmp_nh_table = ecmp_nh_table,
> .chassis = chassis,
> .active_tunnels = &rt_data->active_tunnels,
> .local_datapaths = &rt_data->local_datapaths,
> --
> 2.51.0
>
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev