Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nl_l3: fix nnhs handling a bit #441

Merged
merged 3 commits into from
Jun 6, 2024
Merged

nl_l3: fix nnhs handling a bit #441

merged 3 commits into from
Jun 6, 2024

Commits on Jun 4, 2024

  1. nl_l3::del_l3_unicast_route(): ignore routes with no nexthops

    Like we do when adding a route, ignore routes with no nexthops.
    
    Signed-off-by: Jonas Gorski <[email protected]>
    KanjiMonster committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    b2640c4 View commit details
    Browse the repository at this point in the history
  2. nl_l3::add_l3_unicast_route(): fix nnhs handling

    We already rejected routes with nnhs == 0 earlier, so nnhs cannot be 0
    at this stage. Instead, we have only two options, nnhs == 1 (single
    nexthop or on-link route), or nnhs > 1 (ecmp route).
    
    So convert the switch to a if-else and make the 0 for on-link and routes
    with unresolved neighbor explicit.
    
    Signed-off-by: Jonas Gorski <[email protected]>
    KanjiMonster committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    af60faa View commit details
    Browse the repository at this point in the history
  3. nl_l3::del_l3_unicast_route(): use nnhs for ecmp determination

    We used the number of total nexthops for determining ecmp routes on
    creation, so we need to do the same on deletion.
    
    Signed-off-by: Jonas Gorski <[email protected]>
    KanjiMonster committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    8e57584 View commit details
    Browse the repository at this point in the history