-
Bug
-
Resolution: Done
-
Normal
-
None
-
None
-
1
-
False
-
-
False
-
-
ovn25.09-25.09.0-beta.20.el9fdp
-
rhel-9
-
None
-
rhel-net-ovn
-
-
-
ssg_networking
-
Low
Problem Description: Clearly explain the issue.
As indicated by imaximet@redhat.com filtered netlink dumps are not supported on older kernels. In such cases ovn-controller should perform its own filtering.
Discussed here:
https://mail.openvswitch.org/pipermail/ovs-dev/2025-August/425375.html
>>> + /* Older kernels do not support filtering. */ >>> + if (!(nlmsghdr->nlmsg_flags & NLM_F_DUMP_FILTERED)) { >>> + filtered = false; >> >> If we got an unfiltered dump, we need to ignore this message, unless the >> ifindex of the entry matches our current dump criteria. If we handle this >> message, the callback will delete all the entries that are not in the >> current hash map of advertised neighbors, i.e. it will delete all the >> neighbors for all other ports. And it will also learn unrelated neighbours >> that are not OVN-owned. >>
The discussion above was about dumping of Linux neighbor entries through netlink but it's also relevant for routes (used when interacting with BGP daemons running on the host):
https://github.com/ovn-org/ovn/blob/9bb45587a89c33ecaee275f532a24cc558abf14f/controller/route-exchange-netlink.c#L275C1-L297C67
int re_nl_sync_routes(uint32_t table_id, const struct hmap *routes, struct vector *learned_routes, const struct sbrec_datapath_binding *db) { struct hmapx routes_to_advertise = HMAPX_INITIALIZER(&routes_to_advertise); struct advertise_route_entry *ar; int ret; HMAP_FOR_EACH (ar, node, routes) { hmapx_add(&routes_to_advertise, ar); } /* Remove routes from the system that are not in the routes hmap and * remove entries from routes hmap that match routes already installed * in the system. */ struct route_msg_handle_data data = { .routes = routes, .routes_to_advertise = &routes_to_advertise, .learned_routes = learned_routes, .db = db, }; route_table_dump_one_table(table_id, handle_route_msg, &data); [...]
route_table_dump_one_table() returns true if the dump result was filtered by the kernel. Unfortunately, the OVS route_table_dump_one_table() function doesn't pass the "filtered" argument to the handle_route_msg() callback.
A reasonable way to fix this is to add an early check in handle_route_msg() to bail early if the received route->rta_table_id doesn't actually match the expected table ID:
https://github.com/ovn-org/ovn/blob/9bb45587a89c33ecaee275f532a24cc558abf14f/controller/route-exchange-netlink.c#L208
Impact Assessment: Describe the severity and impact (e.g., network down,availability of a workaround, etc.).
Incorrect routing on older kernels. NOTE: it's not really expected that this feature is used on older kernels so the severity of the issue is probably quite low.
Software Versions: Specify the exact versions in use (e.g.,openvswitch3.1-3.1.0-147.el8fdp).
Any ovn version >= 25.03.
Issue Type: Indicate whether this is a new issue or a regression (if a regression, state the last known working version).
Day one issue
Reproducibility: Confirm if the issue can be reproduced consistently. If not, describe how often it occurs.
Reproduction Steps: Provide detailed steps or scripts to replicate the issue.
Spotted during code review, it would require testing the OVN unicast BGP feature on older kernels (that don't support netlink filtering) and with multiple routing tables configured on the host..
Expected Behavior: Describe what should happen under normal circumstances.
ovn-controller should ignore routes in host tables it's not monitoring; also on old kernels that don't support netlink filtered dumps.
Observed Behavior: Explain what actually happens.
See description.
Troubleshooting Actions: Outline the steps taken to diagnose or resolve the issue so far.
Logs: If you collected logs please provide them (e.g. sos report, /var/log/openvswitch/* , testpmd console)
- clones
-
FDP-1613 [OVN][BGP] ovn-controller should handle old kernels that don't support filtered route netlink dumps
-
- Closed
-