Files
Nick Hainke 8b437684c7 babeld: fix issues in the ubus bindings and the init script
Fix the issues the Copilot review found in the code moved from the
routing feed:

- The init script wrote "option ignore '0'" of an interface section as
  "interface <dev> ignore false" into the babeld configuration, which
  babeld rejects. Skip the option like ifname.
- The handlers of get_xroutes, get_routes and get_neighbours didn't
  check their allocations. Free the collected entries and return an
  error instead of crashing.
- add_filter allocated and returned success for an invalid filter type
  and leaked the filter. Reject the type before the allocation, and
  handle a failure of strdup() and add_filter().
- babeld doesn't use uloop, so the default handler of libubus did
  nothing when ubusd restarted. The stale socket stayed readable and
  babeld spun in its select loop, and the babeld object was never
  added again. Reconnect from the main loop instead, waiting longer
  after each failed attempt, up to 32 seconds. ubus_reconnect() adds
  the object again.
- The notifications used the helpers for array elements, so their
  fields were in an unnamed table. Put them at the root of the message.
- Neighbour notifications were named neigh.*, while ubus.h documents
  neighbour.*. Use the documented names.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Nick Hainke <vincent@systemli.org>
2026-10-11 15:56:41 +02:00
..
…