Commit Graph

37607 Commits

Author SHA1 Message Date
Christian Hopps
2fb6519c52 lib: northbound oper: fix keyless position predicate queries
- i.e., `show /foos/foo[1]`

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-01-07 01:24:14 -05:00
Jafar Al-Gharaibeh
8ca4c3d098
Merge pull request #17752 from raja-rajasekar/rajasekarr/comp_issue
zebra: fix dpdk compilation error
2025-01-05 20:15:20 -06:00
Donatas Abraitis
8824c3f025
Merge pull request #17750 from jvoss/vrf_rpki
tools: Add missing rpki keyword to vrf in frr-reload
2025-01-04 13:52:40 +02:00
Donatas Abraitis
c5fb0a9867
Merge pull request #17715 from ykholod/master-17413-1
babel: Clean babel related config on daemon stop
2025-01-04 13:51:03 +02:00
Donatas Abraitis
3424f22f86
Merge pull request #17762 from anlancs/fix/ospf-minor-word
ospfd: Correct one word
2025-01-04 13:49:22 +02:00
Rajasekar Raja
eced678d34 zebra: fix dpdk compilation error
Fixing compilation error in a switch statement case

Fixes :aa4786642c9a65c282d0fd5247a35b0f14fa1c3c

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2025-01-03 11:13:02 -08:00
anlan_cs
3522ab21d0 ospfd: Correct one word
Signed-off-by: anlan_cs <anlan_cs@126.com>
2025-01-03 22:57:30 +08:00
Mark Stapp
385a219397
Merge pull request #17732 from opensourcerouting/fix/isisd_detail_json
isisd: Show correct level information for `show isis interface detail json`
2025-01-03 07:37:05 -05:00
Donatas Abraitis
73fad72213
Merge pull request #17737 from chiragshah6/fdev7
zebra:check DAD freeze action before notifying bgp
2025-01-03 09:34:54 +02:00
Jonathan Voss
975ee8ed6e tools: Add missing rpki keyword to vrf in frr-reload
When reloading the following configuration:
```
vrf red
 rpki
  rpki cache tcp 172.65.0.2 8282 preference 1
 exit
exit-vrf
```
frr-reload.py does not properly enter the `rpki` context
within a `vrf`. Because of this, it fails to apply RPKI
configurations.

Signed-off-by: Jonathan Voss <jvoss@onvox.net>
2025-01-03 03:31:57 +00:00
Donatas Abraitis
352b97ff00
Merge pull request #17726 from guoguojia2021/static_fix
staticd: Reduce the frequency of adding routes
2025-01-02 13:22:54 +02:00
Yaroslav Kholod
a05c6af88f babel: Clean babel related config on daemon stop
When deactivating babel no router babel and later re-enabling it router babel the previous configuration is still in place.

Steps to reproduce:

    Enable babel
    Configure babel
    Disable babel with "no router babel"
    Verify config

Expected correct behavior: No config present

Signed-off-by: Yaroslav Kholod <y.kholod@vyos.io>
2025-01-02 13:15:45 +02:00
Donatas Abraitis
f3daeda935
Merge pull request #17716 from ykholod/master-17463
bgpd: Clean address-family config on daemon restart
2025-01-01 21:16:39 +02:00
Donatas Abraitis
3acfcef778
Merge pull request #17728 from dmytroshytyi-6WIND/bgp_rpki_state
bgpd: add rpki current state
2025-01-01 21:15:42 +02:00
Donatas Abraitis
97cad1c4d0
Merge pull request #17731 from raja-rajasekar/rajasekarr/stale_nhg_link_flap_4200788
zebra: Fix resetting valid flags for NHG dependents
2024-12-31 15:39:40 +02:00
Donatas Abraitis
38c3419f3d
Merge pull request #17719 from jvoss/srv6_format
tools: Add missing formats keyword to segment-routing in frr-reload
2024-12-31 15:33:21 +02:00
Chirag Shah
5aa9c8652e zebra:check DAD freeze action before notifying bgp
If Duplicate Address Detection action is freeze
(permanent or definite time means not warn only mode)
then locally duplicate detected MAC delete notification
is not require to inform,
instead ask BGP to sync previous remote MAC entry.
In freeze case local MAC event is not known to BGP,
instead BGP is pointing to remote VTEP for the MAC.

Ticket: #3652383
Issue: 3652383

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-12-30 14:39:27 -08:00
Donald Sharp
54ec9f3888 zebra: Fix resetting valid flags for NHG dependents
Upon if_down, we don't reset the valid flag for dependents
and unset the INSTALLED flag.

So when its time for the NHG to be deleted (routes dereferenced),
zebra deletes it since refcnt goes to 0, but stale NHG remains in kernel.

Ticket :#4200788

Signed-off-by: Donald Sharp <sharpd@nvidia.com>

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-12-30 08:40:44 -08:00
Donald Sharp
8d8f73eed0
Merge pull request #17734 from opensourcerouting/fix/show_discarded_withdrawn_routes
bgpd: Show prefix-related stats per neighbor
2024-12-30 08:20:25 -05:00
Yaroslav Kholod
663281ca6a BGP: Clean address-family config on daemon restart
When stopping and restarting BGP daemon part of the configuration
remains. It should be cleared.
Particulary those are address-family parametes, like: distance,
ead-es-frag, disable-ead-evi-rx, disable-ead-evi-tx.

Signed-off-by: Yaroslav Kholod <y.kholod@vyos.io>
2024-12-30 14:37:54 +02:00
Donatas Abraitis
6fb7b3401b tests: Check prefix statistics for path-attribute discard/withdraw
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-30 12:27:00 +02:00
Donatas Abraitis
28e62b46ba bgpd: Show prefix-related stats per neighbor
E.g.:

```
  Prefix statistics:
    Inbound filtered: 0
    AS-PATH loop: 0
    Originator loop: 0
    Cluster loop: 0
    Invalid next-hop: 0
    Withdrawn: 0
    Attributes discarded: 3
```

JSON:

```
    "prefixStats":{
      "inboundFiltered":0,
      "aspathLoop":0,
      "originatorLoop":0,
      "clusterLoop":0,
      "invalidNextHop":0,
      "withdrawn":0,
      "attributesDiscarded":3
    },
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-30 12:26:19 +02:00
Dmytro Shytyi
5f50b98f8e
tests: add bgp rpki topo1 rpkiValidationState
Topotest to verify the next key-value "rpkiValidationState": "valid"

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2024-12-30 09:45:26 +01:00
Donatas Abraitis
360a0d6f4c isisd: Show correct level information for show isis interface detail json
Having this configuration:

```
!
interface r1-eth0
 ip address 10.0.0.1/30
 ip router isis 1
 isis priority 44 level-1
 isis priority 88 level-2
 isis csnp-interval 90 level-1
 isis csnp-interval 99 level-2
 isis psnp-interval 70 level-1
 isis psnp-interval 50 level-2
 isis hello-interval level-1 120
 isis hello-interval level-2 150

!
interface r1-eth1
 ip address 10.0.0.10/30
 ip router isis 1
!
interface lo
 ip address 192.0.2.1/32
 ip router isis 1
 isis passive
!
router isis 1
net 49.0000.0000.0000.0001.00
 metric-style wide
```

Produces:

```
{
 "areas":[
   {
     "area":"1",
     "circuits":[
       {
         "circuit":2,
         "interface":{
           "name":"r1-eth0",
           "state":"Up",
           "is-passive":"active",
           "circuit-id":"0x2",
           "type":"lan",
           "level":"L1L2",
           "snpa":"6e28.9c92.da5e",
           "levels":[
             {
               "level":"L1",
               "metric":10,
               "active-neighbors":1,
               "hello-interval":120,
               "holddown":{
                 "count":10,
                 "pad":"yes"
               },
               "cnsp-interval":90,
               "psnp-interval":70,
               "lan":{
                 "priority":44,
                 "is-dis":"no"
               }
             },
             {
               "level":"L2",
               "metric":10,
               "active-neighbors":1,
               "hello-interval":120, <<<<<<<<<<<<<<<<<<
               "holddown":{
                 "count":10,
                 "pad":"yes"
               },
               "cnsp-interval":90, <<<<<<<<<<<<<<<<<<
               "psnp-interval":70, <<<<<<<<<<<<<<<<<<
               "lan":{
                 "priority":44, <<<<<<<<<<<<<<<<<<
                 "is-dis":"no"
               }
             }
           ],
...
```

Fixes: 9fee4d4c60 ("isisd: Add json to show isis interface command.")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-30 10:31:44 +02:00
Philippe Guibert
24302c25d3
bgpd: display rpki state in 'show bgp ipvX detail'
The rpki current state was ignored when calling for the 'show bgp ipvX
detail' command. Handle the support for this, with json support too.

> "rpkiValidationState" : "valid",
> "rpkiValidationState" : "invalid",
> "rpkiValidationState" : "not used",
> "rpkiValidationState" : "not found",

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2024-12-27 15:32:35 +01:00
Igor Ryzhov
1d63ddd4b9
Merge pull request #17720 from jvoss/srv6_cli
isisd: fix srv6 exit statements
2024-12-27 13:17:03 +02:00
guozhongfeng.gzf
c2f0206c3c staticd: Reduce the frequency of adding routes
Signed-off-by: guozhongfeng.gzf <guozhongfeng.gzf@alibaba-inc.com>
2024-12-27 12:16:17 +08:00
Donatas Abraitis
3f6c106e48
Merge pull request #17718 from cscarpitta/fix/fix-srv6-static-route-pytestmark
tests: Fix markers in `srv6_static_route` topotest
2024-12-26 14:17:21 +02:00
Jonathan Voss
dcb03c44e7 isisd: fix srv6 exit statements
Fix missing and misplaced `exit` statements to `show running-config` output.

Before:
```
router isis ISIS_CORE
 [...]
 segment-routing srv6
  locator ISIS_LOC
 exit    <<<<<<< always placed after locator
  node-msd
    [...]
  exit    <<<<<<< missng
  interface dum6
exit
```

After:
```
router isis ISIS_CORE
 [...]
 segment-routing srv6
  locator ISIS_LOC
  node-msd
   [...]
  exit
  interface dum6
 exit
exit
```

Related #16694

Signed-off-by: Jonathan Voss <jvoss@onvox.net>
2024-12-25 00:46:17 +00:00
Jafar Al-Gharaibeh
803ff41cc4
Merge pull request #17647 from LabNConsulting/fix-oper-test
tests: enable test failure detection and fix resulting failures
2024-12-24 12:35:32 -06:00
Jonathan Voss
5b8b821f2f tools: Add missing formats keyword to segment-routing in frr-reload
When reloading the following configuration:
```
segment-routing
 srv6
  formats
   format usid-f3216
     wide-local-id-block explicit start 100
   exit
   !
   format uncompressed-f4024
   exit
   !
  exit
  !
 exit
 !
exit
```
frr-reload.py does not properly enter the `formats` context. Because of this,
it fails with an unknown command error when applying new or updating format
configuration.

Signed-off-by: Jonathan Voss <jvoss@onvox.net>
2024-12-24 17:27:23 +00:00
Carmine Scarpitta
225a1c7ed6 tests: Fix markers in srv6_static_route topotest
`srv6_static_route` is a pure staticd topotest. It does not have any
dependency on bgpd and sharpd.

Let's fix the pytestmark to include only staticd.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-24 10:38:37 +01:00
Christian Hopps
764f276022 mgmtd: fix memory leak in FE adapter
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-12-24 03:04:23 -05:00
Christian Hopps
3d3ee2a1af tests: enable failure and fix broken tests
This test was not actually failing when the results didn't match. Fail
now. Also fix the tests that are now found to be failing incorrectly
(wrong expected result).

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-12-24 03:04:23 -05:00
Donatas Abraitis
9ce3b144c9
Merge pull request #17580 from varuntumbe/dev/label_pool_release_fix
BGP Labelpool : Releasing the label in labelpool when VPN session gets removed
2024-12-23 14:48:21 +02:00
Donatas Abraitis
61ba8b91e5
Merge pull request #17711 from cscarpitta/fix/remove-srv6-locator-alloc-failure-tests
zebra: Remove tests for `srv6_locator_alloc` failure
2024-12-23 09:45:14 +02:00
Carmine Scarpitta
13f3c7c679 zebra: Remove tests for srv6_locator_alloc failure
`srv6_locator_alloc` can never fail. Let's remove the tests for
allocation failure.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-22 09:01:59 +01:00
Jafar Al-Gharaibeh
e62c2f10bc
Merge pull request #17684 from opensourcerouting/fix/json_time_no_newline
bgpd, lib: Use frrstr_time() when using ctime_r()
2024-12-21 22:59:58 -06:00
Jafar Al-Gharaibeh
0fbda45105
Merge pull request #17706 from cscarpitta/fix/convert-to-ipv6-max-bytelen
bgpd: Convert 16 to IPV6_MAX_BYTELEN
2024-12-21 22:56:47 -06:00
Jafar Al-Gharaibeh
79be632713
Merge pull request #17705 from opensourcerouting/fix/enforce-first-as_peer-group
bgpd: Fix enforce-first-as per peer-group removal
2024-12-21 22:54:50 -06:00
Carmine Scarpitta
cfab26b180 bgpd: Replace 16 integer with IPV6_MAX_BYTELEN
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-22 02:12:02 +01:00
Carmine Scarpitta
3bc44ee5eb bgpd: Replace 16 integer with IPV6_MAX_BYTELEN
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-22 02:11:20 +01:00
Donatas Abraitis
8cd73c792c
Merge pull request #17703 from cscarpitta/fix/fix-srv6-locator-doc
doc: Fix SRv6 locator documentation
2024-12-21 17:14:42 +02:00
Donatas Abraitis
f3b55831b4
Merge pull request #17704 from anlancs/fix/mgmtd-compile-error
mgmtd: fix compile error
2024-12-21 17:14:06 +02:00
Donatas Abraitis
9047ce6d9c tests: Check if enforce-first-as is working with peer-groups
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-21 17:08:01 +02:00
Donatas Abraitis
b6dcf61877 bgpd: Fix enforce-first-as per peer-group removal
If we do `no neighbor PG enforce-first-as`, it wasn't working because the flag
was inherited incorrectly for the members of the peer-group.

Fixes: 322462920e ("bgpd: Enable enforce-first-as by default")

Closes: https://github.com/FRRouting/frr/issues/17702

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-21 17:04:30 +02:00
anlan_cs
b5b8c9d3ec mgmtd: fix compile error
Compile error with `--disable-ripd`:
```
mgmtd/mgmt_be_adapter.c:86:5: error: "HAVE_RIPD" is not defined, evaluates to 0 [-Werror=undef]
   86 | #if HAVE_RIPD
      |     ^~~~~~~~~
```
I have searched the code, there is only three places need to be fixed.

Signed-off-by: anlan_cs <anlan_cs@126.com>
2024-12-21 19:32:47 +08:00
Carmine Scarpitta
fd21131ecf doc: Show the valid range of SRv6 locator node-len
The documentation should provide the valid range of SRv6 locator
node-len parameter, rather than the default value.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-21 09:30:57 +01:00
Carmine Scarpitta
f8ff3e6e06 doc: Show the valid range of SRv6 locator block-len
The documentation should provide the valid range of SRv6 locator
block-len parameter, rather than the default value.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-21 09:29:55 +01:00
Carmine Scarpitta
bcad7df60d doc: Fix the order of SRv6 locator parameters
Align the order of the SRv6 locator parameters with the actual implementation:

```
"prefix X:X::X:X/M$prefix [block-len (16-64)$block_bit_len]  \
	        [node-len (16-64)$node_bit_len] [func-bits (0-64)$func_bit_len]"
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-12-21 09:26:44 +01:00