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

Nexthop group AFI calculation #17049

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 9, 2024

  1. zebra: rework zebra_nhg_proto_add() parameters

    This small rework prepares next commit.
    
    Signed-off-by: Philippe Guibert <[email protected]>
    pguibert6WIND committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    3f0deff View commit details
    Browse the repository at this point in the history
  2. zebra: fix the afi resolution for protocol nexthop-groups

    A protocol nexthop group with multiple nexthop may have
    an undefined AFI value.
    
    > ubuntu2204hwe(config)# nexthop-group A
    > ubuntu2204hwe(config-nh-group)# nexthop 10.0.2.150 mgmt0
    > ubuntu2204hwe(config-nh-group)# do show nexthop-group rib sharp
    > ID: 181818168 (sharp)
    >      RefCnt: 1
    >      Uptime: 00:00:06
    >      VRF: default(IPv4)
    >      Valid, Installed
    >      Depends: (13)
    >            via 10.0.2.150, mgmt0 (vrf default), weight 1
    > ID: 13 (sharp)
    >      RefCnt: 2
    >      Uptime: 00:00:06
    >      VRF: default(IPv4)
    >      Valid, Installed
    >      Interface Index: 2
    >            via 10.0.2.150, mgmt0 (vrf default), weight 1
    >      Dependents: (181818168)
    > ubuntu2204hwe(config-nh-group)# nexthop 10.0.2.155 mgmt0
    > ubuntu2204hwe(config-nh-group)# do show nexthop-group rib sharp
    > ID: 181818168 (sharp)
    >      RefCnt: 1
    >      Uptime: 00:00:02
    >      VRF: default(bad-value)				<---- (AFI_UNSPEC)
    >      Valid, Installed
    >      Depends: (13) (14)
    >            via 10.0.2.150, mgmt0 (vrf default), weight 1
    >            via 10.0.2.155, mgmt0 (vrf default), weight 1
    > ID: 13 (sharp)
    >      RefCnt: 2
    >      Uptime: 00:00:02
    >      VRF: default(IPv4)
    >      Valid, Installed
    >      Interface Index: 2
    >            via 10.0.2.150, mgmt0 (vrf default), weight 1
    >      Dependents: (181818168)
    > ID: 14 (sharp)
    >      RefCnt: 2
    >      Uptime: 00:00:02
    >      VRF: default(IPv4)
    >      Valid, Installed
    >      Interface Index: 2
    >            via 10.0.2.155, mgmt0 (vrf default), weight 1
    >      Dependents: (181818168)
    
    On the creation of a nexthop-group, check the afi value for
    all the nexthops of that nexthop-group. Check that the value
    is the same, cancel the nexthop-group add otherwise.
    
    Signed-off-by: Mark Stapp <[email protected]>
    Signed-off-by: Philippe Guibert <[email protected]>
    pguibert6WIND committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    6193879 View commit details
    Browse the repository at this point in the history