Commit graph

38763 commits

Author SHA1 Message Date
Philippe Guibert 542a0f7518 sharpd: add uSID instruction support to seg6local routes
Seg6local routes can be installed with uSID instruction.

> ubuntu2204hwe# sharp install seg6local-routes 1006::1 nexthop-seg6local loop1 uN
> ubuntu2204hwe# Ctrl-D
> # ip -6 ro show
> 1006::1 nhid 28  encap seg6local action End flavors next-csid lblen 32 nflen 16 dev loop1 proto 194 metric 20 pref medium

As of today, uA and uN can be displayed with iproute2. The other
instructions are not rejected by the kernel, but are not displayed by
iproute2.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-04-25 14:30:13 +02:00
Mark Stapp 4da04350df
Merge pull request #18716 from y-bharath14/srib-yang-v11
yang: Fix pyang errors in frr-interface.yang
2025-04-24 08:01:39 -04:00
Y Bharath 927c5c2a4a yang: Fix pyang errors in frr-interface.yang
Fix pyang warnings and errors in frr-interface.yang

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-24 12:12:12 +05:30
Jafar Al-Gharaibeh c3c46adf16
Merge pull request #18672 from usrivastava-nvidia/master
Some checks are pending
build-test / Build the x86 ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu x86 docker image (push) Blocked by required conditions
build-test / Build the ARM ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu ARM docker image (push) Blocked by required conditions
pimd: Fix for crash during networking restart
2025-04-23 23:17:45 -05:00
Utkarsh Srivastava b88cce2330 pimd: Fix for crash during networking restart
During vrf delete, the vxlan_info.work_list
linked list was deleted which is a global list
containing the SGs for all the VRFs.

If two vrfs are configured, vrf a and vrf b and
both has SGs assocaited with them which are
inserted in the vxlan_info.work_list. Now if
vrf a is deleted, it deletes the work_list also.
Due to this when any SG add or del comes for vrf b
it tries to access the work_list and crashes.

Fix
Delete the vxlan_info.work_list only when all the
VRFs are terminated and unset the vxlan_info.flags
so if new add cmd comes it re-allocates the work_list.

Signed-off-by: usrivastava-nvidia <usrivastava@nvidia.com>
2025-04-23 14:03:02 +00:00
Donald Sharp 827e1d69b9
Merge pull request #18691 from valentinbinotto/valentin-dev
Some checks are pending
build-test / Build the x86 ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu x86 docker image (push) Blocked by required conditions
build-test / Build the ARM ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu ARM docker image (push) Blocked by required conditions
doc: state correct default behaviour of VTYSH_PAGER env if unset (vtysh manpage)
2025-04-23 09:23:12 -04:00
Philippe Guibert f7ae2c17ea
Merge pull request #18677 from chdxD1/fix-rmac-nhlist
zebra: add vtep_ip to rmac nh_list in all cases
2025-04-23 15:07:01 +02:00
Donatas Abraitis 0ffed03d4a
Merge pull request #16836 from cscarpitta/feature/srv6-show-sids
Some checks are pending
build-test / Build the x86 ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu x86 docker image (push) Blocked by required conditions
build-test / Build the ARM ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu ARM docker image (push) Blocked by required conditions
zebra: Add CLI to display SRv6 SIDs allocated
2025-04-23 05:22:27 +03:00
Donatas Abraitis 3e647e71d5
Merge pull request #18656 from leonshaw/evpn-strip-ecom
bgpd: Clean extended communities for VRF routes imported from EVPN
2025-04-23 05:21:26 +03:00
Donatas Abraitis a4af12134e
Merge pull request #18703 from donaldsharp/line_vty
doc: line vty was not documented
2025-04-23 05:08:39 +03:00
Donald Sharp 06dd473602 doc: line vty was not documented
Try to document the sub-node `line vty` and
what it can do.  Call out the distinction
between vtysh and VTY.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-04-22 15:18:41 -04:00
Donald Sharp 12e95e5cb0
Merge pull request #18694 from petrvaganoff/dev
Some checks are pending
build-test / Build the x86 ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu x86 docker image (push) Blocked by required conditions
build-test / Build the ARM ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu ARM docker image (push) Blocked by required conditions
bgpd: Fix deref after free in bgp_vrf_unlink
2025-04-22 12:27:00 -04:00
Donald Sharp 114af4ca16
Merge pull request #18698 from y-bharath14/srib-tests-v13
tests: Shadowing the built-in function
2025-04-22 12:23:56 -04:00
Valentin Binotto f690276086 doc: Updated the default for VTYSH_PAGER if unset in user docs
Signed-off-by: Valentin Binotto <git.8c400bab53f220f13efe0112c1ea2f96@v434project.com>
2025-04-22 16:01:41 +00:00
Russ White 93f29b595a
Merge pull request #18683 from LabNConsulting/chopps/notif-improve
Some checks are pending
build-test / Build the x86 ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu x86 docker image (push) Blocked by required conditions
build-test / Build the ARM ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu ARM docker image (push) Blocked by required conditions
Improve notification selectors (sort, eliminate dups)
2025-04-22 11:27:16 -04:00
Christopher Dziomba ab68237e3e
tests: remove ipv4 and ipv6 in bgp_evpn_rt5
Removal of IPv6 was already tested in bgp_evpn_rt5 topotest, however
IPv4 was not tested afterwards. This now removes IPv6 routes first,
then adds them back and removes IPv4 afterwards, waiting for
convergence everytime.

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2025-04-22 17:25:57 +02:00
Christopher Dziomba 0c14dd3af6
zebra: add vtep_ip to rmac nh_list in all cases
zebra rmac has a nh_list which tracks the assigned VTEP IPs to RMACs.
It can also receive IPv6 encoded IPv4 addresses as VTEPs. Changing/
Installing the RMAC into the Kernel is only important when the IPv4
address changes. However because nh_list is a nodup list used to
track usage or RMACs by VTEP IPs, both IP addresses (IPv4 and IPv6
encoded IPv4) should be written into it, as both could be removed
in l3vni_rmac_nh_list_nh_delete independently.

Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
2025-04-22 17:22:43 +02:00
Russ White deb473ff1d
Merge pull request #18695 from askorichenko/test-show-advertised-routes-vty
bgpd: fix vty's version of show advertised-routes
2025-04-22 11:09:17 -04:00
Russ White e525972513
Merge pull request #18158 from chdxD1/evpn-no-withdraw-for-update
Update EVPN prefix routes properly instead of withdraw/install
2025-04-22 10:54:57 -04:00
Y Bharath 8cf9900390 tests: Shadowing the built-in function
Shadowing the built-in function in lutil.py

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-04-22 16:09:23 +05:30
Russ White 87923c8cb0
Merge pull request #18626 from donaldsharp/RA_me
Some checks are pending
build-test / Build the x86 ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu x86 docker image (push) Blocked by required conditions
build-test / Build the ARM ubuntu 22.04 docker image (push) Waiting to run
build-test / Test ubuntu ARM docker image (push) Blocked by required conditions
Implement RFC8781 (NAT64 prefix in RA's)
2025-04-21 17:32:58 -04:00
Alexander Skorichenko af6fe87d7c bgpd: fix vty's version of show advertised-routes
Fix displayed metric if a route-map is applied to advertised routes

Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2025-04-21 21:23:54 +02:00
Donatas Abraitis 1425a43c1b
Merge pull request #18689 from donaldsharp/limit_outgoing_packets
bgpd: ensure that bgp_generate_updgrp_packets shares nicely
2025-04-21 19:29:12 +03:00
Petr Vaganov 765945feed bgpd: Fix deref after free in bgp_vrf_unlink
Found by the static analyzer Svace (ISP RAS): DEREF_AFTER_FREE -
Pointer '&bgp->vrf_id' is dereferenced after the referenced memory
was deallocated by passing as 1st parameter to function 'bgp_unlock'.

Signed-off-by: Petr Vaganov <petrvaganoff@gmail.com>
2025-04-21 20:52:33 +05:00
Christian Hopps ac832fbff0 lib: nb_notif: notification selectors sorted with no dups
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-04-21 09:22:28 +00:00
Christian Hopps 2dc8d070d6 mgmtd: validate notify selectors to be xpaths that result to nodes
Also, only message interested backend clients about a path removal when last
supporting session is being removed from a given notification path.

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-04-21 09:22:28 +00:00
Christian Hopps ccde9d7ea0 lib: mgmt backend: add refer_id to notification message
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-04-21 09:22:28 +00:00
Christian Hopps 7d2a0ffc69 lib: darr: add string search macros
Add macros to support searching for and finding (perhaps closest) matches
for a key in an array of strings.

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-04-21 09:22:28 +00:00
Carmine Scarpitta bd0d8218b7 zebra: Fix missing blank line checkpatch warning
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-04-19 10:59:43 +00:00
Carmine Scarpitta 0ecf39ed9a doc: Add example for show specific SID CLI
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-04-19 10:59:43 +00:00
Carmine Scarpitta 13b1a5f75b doc: Add example for show SIDs CLI
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-04-19 10:59:43 +00:00
Carmine Scarpitta e49558718a doc: Add documentation for show SIDs command
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-04-19 10:59:43 +00:00
Carmine Scarpitta 9c80d265f9 zebra: Add CLI to display SRv6 SIDs allocated
```
router# show segment-routing srv6 sid
 SID                   Behavior    Context                Daemon/Instance    Locator    Allocation Type
 --------------------  ----------  ---------------------  -----------------  ---------  -----------------
 fcbb:bbbb:1::         uN          -                      isis(0)            MAIN       dynamic
 fcbb:bbbb:1:fe00::    uDT6        VRF 'vrf10'            bgp(0)             MAIN       dynamic
 fcbb:bbbb:1:fe01::    uDT6        VRF 'vrf20'            bgp(0)             MAIN       dynamic
 fcbb:bbbb:1:e000::    uA          Interface 'eth-sw1'    isis(0)            MAIN       dynamic
 fcbb:bbbb:1:e001::    uA          Interface 'eth-sw1'    isis(0)            MAIN       dynamic
```

```
router# show segment-routing srv6 sid json
{
  "fc00:0:1::":{
    "sid":"fc00:0:1::",
    "behavior":"uN",
    "context":{},
    "locator":"loc1",
    "allocationMode":"dynamic",
    "clients":[
      {
        "proto":"isis",
        "instance":0
      }
    ]
  },
  "fc00:0:1:1::":{
    "sid":"fc00:0:1:1::",
    "behavior":"uA",
    "context":{
      "interfaceIndex":2,
      "interfaceName":"eth-sw1",
      "nexthopIpv6Address":"fe80::4423:f3ff:fe8b:fed"
    },
    "locator":"loc1",
    "allocationMode":"dynamic",
    "clients":[
      {
        "proto":"isis",
        "instance":0
      }
    ]
  },
  "fc00:0:1:2::":{
    "sid":"fc00:0:1:2::",
    "behavior":"uA",
    "context":{
      "interfaceIndex":2,
      "interfaceName":"eth-sw1",
      "nexthopIpv6Address":"fe80::9005:fdff:fe18:1237"
    },
    "locator":"loc1",
    "allocationMode":"dynamic",
    "clients":[
      {
        "proto":"isis",
        "instance":0
      }
    ]
  }
}
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-04-19 10:59:38 +00:00
Carmine Scarpitta 6267567aa1 isisd: Pass ifindex when releasing End.X SIDs
When isisd releases an End.X SID it should also pass the interface
index down to zebra.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-04-19 09:58:22 +00:00
Carmine Scarpitta eca924f9e2 isisd: Pass ifindex when allocate End.X SIDs
When isisd allocates an End.X SID it should also pass the interface
index down to zebra.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2025-04-19 09:58:22 +00:00
Christian Hopps fca333e342 lib: darr: use unique variable names in insert macro
- Missed insert mcaro when fixing the other macros.
- Also, actually use `MT` argument in the mt variant insert macros

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-04-19 09:38:57 +00:00
Donatas Abraitis 004c6c0260
Merge pull request #18692 from donaldsharp/event_cleanups
zebra: Save event pointer for rib sweeping
2025-04-19 03:40:27 +03:00
Donald Sharp 547894c087 zebra: Save event pointer for rib sweeping
The rib_sweep_route function when not doing graceful
restart does not attempt to save the event on the
t_rib_sweep pointer for shutdown.  Prevent any
weird shenanigans by allowing shutdown to clean
up the rib_sweep_route event.

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
2025-04-18 17:44:39 -04:00
Donald Sharp 681caee944 bgpd: ensure that bgp_generate_updgrp_packets shares nicely
The bgp_generate_updgrp_packet function will attempt to write
up to `write quanta 64` packets at one time.  This is extremely
expensive at scale and is causing CPU_HOGS as well as STARVATION
messages.  Check to see if we should yield the CPU to allow
something else in BGP to continue working.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-04-18 13:50:33 -04:00
Xiao Liang 9c6e6a35d4 topotests: Add check of imported routes for bgp_evpn_rt5
In bgp_evpn_rt5, check if EVPN routes are correctly imported to VRF.
Note that EVPN and RT extended communities should have been stripped.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
2025-04-18 09:51:53 +08:00
Xiao Liang b336388d4a bgpd: Clean extended communities for VRF routes imported from EVPN
According to draft-ietf-bess-evpn-ipvpn-interworking-13, strip
the following extended communities for VRF routes imported from EVPN.

  a. BGP Encapsulation extended communities.
  b. Route Target extended communities.
  c. All the extended communities of type EVPN.

As the corresponding fields will not be always covered by extended
communities, add them to attr hash key directly.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
2025-04-18 09:48:32 +08:00
Donald Sharp 5d4c7d2ece
Merge pull request #18675 from mjstapp/fix_clang_18_warnings
lib,pimd,bgpd,bfdd: Fix clang 18 warnings
2025-04-17 18:38:21 -04:00
Donatas Abraitis 0850ae7db7
Merge pull request #18658 from y-bharath14/srib-tests-v12
tests: Resource leak in common_config.py
2025-04-17 18:18:26 +03:00
Donald Sharp 2892c20097
Merge pull request #18538 from nabahr/autorp-enabling
pimd: Only create and bind the autorp socket when really needed
2025-04-17 10:14:13 -04:00
Mark Stapp 2d42318625 bfdd, bgpd: clean up clang warnings
Clean up some clang compiler warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-16 13:50:21 -04:00
Mark Stapp d378275106 pimd: clean up clang warnings
Clean up clang warnings in pimd; mostly address-of-packed
issues (removed some ugly casts too).

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-16 13:50:21 -04:00
Mark Stapp c65fdc9a49 lib: disable clang warning in parser yacc output
Disable a clang 'unused' warning in the yacc source
of command_parse.c.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-16 13:50:21 -04:00
Jafar Al-Gharaibeh 38968cc8df
Merge pull request #18669 from opensourcerouting/rfapi-misused-conditional
bgpd: fix misused rfapi conditional
2025-04-16 09:39:02 -05:00
Donald Sharp 69a59464ef
Merge pull request #18665 from y-bharath14/srib-yang-v10
yang: Corrected pyang errors in frr-pathd.yang
2025-04-16 09:41:32 -04:00
Mark Stapp 1ca756f315
Merge pull request #18497 from krishna-samy/show-metaq-counters
zebra: show command to display metaq info
2025-04-16 09:16:40 -04:00