Skip to content

zebra: add a new ADJACENCY route type for local neighbors#22613

Open
mjstapp wants to merge 5 commits into
FRRouting:masterfrom
mjstapp:adj_route_dev
Open

zebra: add a new ADJACENCY route type for local neighbors#22613
mjstapp wants to merge 5 commits into
FRRouting:masterfrom
mjstapp:adj_route_dev

Conversation

@mjstapp

@mjstapp mjstapp commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Add a new route type for local neighbors. The neighbor events handled in zebra_neigh.c can (configurably) manage host routes for local neighbors. The routes have a new, distinct route type, so they can be redistributed like any other type. There's a simple topotest also; I'd like to add some more cases to it, but it seems worth opening this PR so we can discuss the approach.

@frrbot frrbot Bot added libfrr tests Topotests, make check, etc yang zebra labels Jul 8, 2026
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds adjacency host routes for local zebra neighbors. The main changes are:

  • A new adjacency route type and netlink protocol mapping.
  • Interface CLI and YANG config for host-routes-enable.
  • Neighbor add, delete, and config-toggle handling for adjacency host routes.
  • RIB helpers for adding and deleting local host routes.
  • A new topotest topology for adjacency route redistribution.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
zebra/zebra_neigh.c Adds neighbor host-route state handling for add, delete, cleanup, and config-toggle paths.
zebra/zebra_rib.c Adds ADJACENCY route metadata and helpers for local host-route add and delete operations.
zebra/zebra_nb_config.c Wires the interface host-routes YANG leaf to zebra neighbor route reconciliation.
lib/route_types.txt Defines the new redistributable adjacency route type and help text.
tests/topotests/adjacency_routes/test_adjacency_routes_topo1.py Adds a topology test that creates a local neighbor and checks adjacency route visibility.

Reviews (2): Last reviewed commit: "zebra: remove some headers from zebra_ne..." | Re-trigger Greptile

Comment thread lib/route_types.txt
Comment thread zebra/zebra_neigh.c
Comment thread zebra/zebra_neigh.c Outdated
Comment thread tests/topotests/adjacency_routes/torm21/frr.conf Outdated
mjs and others added 3 commits July 8, 2026 13:59
Add a new route-type, called ADJACENCY, for local host routes.

Signed-off-by: Mark Stapp <mjs@cisco.com>
Allow per-interface config to control install and delete
of host-routes, using the ADJACENCY type, with neighbor
entries.

Signed-off-by: Mark Stapp <mjs@cisco.com>
Add the per-interface host-routes leaf to the zebra yang
model, and implement nb handling for it.

Signed-off-by: Mark Stapp <mjs@cisco.com>
@mjstapp

mjstapp commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

pushed fixes for some greptile comments...

@mjstapp

mjstapp commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

Mark Stapp added 2 commits July 8, 2026 16:34
Add a topotest that includes some hosts to exercise the
ADJACENCY route type for local neighbors, and check
redistribution via BGP.

Signed-off-by: Mark Stapp <mjs@cisco.com>
Remove some headers that zebra_neigh doesn't seem to need.

Signed-off-by: Mark Stapp <mjs@cisco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant