Commit Graph

36638 Commits

Author SHA1 Message Date
Donald Sharp
5634307f3a
Merge pull request #16841 from mjstapp/fix_bgp_script
bgpd: remove bgpd.h from bgp script header
2024-09-18 12:00:06 -04:00
Donald Sharp
8b25888ce8
Merge pull request #16816 from opensourcerouting/feature/bgp_dual_as
bgpd: Implement BGP dual-as feature
2024-09-18 11:59:16 -04:00
Donald Sharp
3d3c0e35eb tests: use logger.warning not logger.warn
Apparently logger.warn is being deprecated.  So let's
switch over to logger.warning.  Clearly it's better

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-18 11:56:42 -04:00
Russ White
6109043c54
Merge pull request #16720 from opensourcerouting/fix/default_originate_not_needed_if_not_enabled
bgpd: Do not scan update-groups if default-originate timer is set to 0
2024-09-18 10:11:23 -04:00
Donald Sharp
9f149fabd4 ospfd: Add vrf name to debug functions in ospf_zebra.c
This file had a bunch of debugs that were operating on
specific vrf's but not telling you which vrf this was
happening in.  Add code to allow operator debugging
to understand what vrf is being worked on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-18 09:52:49 -04:00
Donald Sharp
1af0a67401 zebra: In zebra_evpn_mac.c remove bad comments
Adding comments that tell what a variable is doing in
the middle of a function call makes it extremely hard
to read the formatting.  Remove.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-18 07:35:54 -04:00
Donald Sharp
03a7ab10fe zebra: Reindent some badly formatted functions in zebra_evpn_mac.c
Fix some badly formatted code to fit better on the screen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-18 07:33:17 -04:00
Donald Sharp
390406973c zebra: Reframe zebra_evpn_mac.c to be properly formatted
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-09-18 07:33:17 -04:00
Donald Sharp
d1af3910b6
Merge pull request #16849 from opensourcerouting/fix/remove_rpki_cmd
bgpd: Remove deprecated RPKI command
2024-09-18 07:27:18 -04:00
Donald Sharp
04a6f2d900
Merge pull request #16840 from LabNConsulting/chopps/yang-lib
add ietf-yang-library support
2024-09-18 07:25:20 -04:00
Donald Sharp
174d46d7fc
Merge pull request #16852 from sri-mohan1/srib-24-frr-a
bgpd: changes for code maintainability
2024-09-18 07:23:56 -04:00
Donatas Abraitis
7a7ae8879f
Merge pull request #16850 from enkechen-panw/show-stat
bgpd: add counters for redistributed and aggregated routes
2024-09-18 08:57:03 +02:00
sri-mohan1
80c8b988b0 bgpd: changes for code maintainability
these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2024-09-18 11:24:19 +05:30
Christian Hopps
d5e4e2dfa5 tests: add test for new ietf-yang-library support
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-17 22:27:36 -04:00
Christian Hopps
c5df98aece mgmtd: add ietf-yang-library support
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-17 22:27:36 -04:00
Enke Chen
25c290a17d bgpd: add counters for redistributed and aggregated routes
Add counters for redistributed routes, and local aggregates to the
output of "show ip bgp statistics".

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-09-17 15:13:49 -07:00
Donatas Abraitis
6a7a83c718 bgpd: Remove deprecated RPKI command
`rpki cache <A.B.C.D|WORD> ...`

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-17 23:04:30 +03:00
Russ White
da96ad08cd
Merge pull request #16774 from donaldsharp/bgp_give_some_ordering_increases
Bgp give some ordering increases
2024-09-17 11:01:34 -04:00
Donald Sharp
ade993b629
Merge pull request #16809 from louis-6wind/fix-rcap-double-free
isisd: fix rcap tlv double-free crash
2024-09-17 08:33:43 -04:00
Donald Sharp
f436b8668b
Merge pull request #16839 from LabNConsulting/chopps/edit-reply
Add `created` and `changed` booleans to `edit-reply` message
2024-09-17 08:30:35 -04:00
Mark Stapp
754d027e7e bgpd: remove bgpd.h from bgp script header
Use forward references instead of including the main bgpd.h
header in the bgp scripting header to reduce external impact
of changes.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-09-17 08:26:04 -04:00
Christian Hopps
b097a966cb lib: mgmtd: add changed and created to edit-reply msg
- This is used for various return values in RESTCONF

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-17 05:31:00 -04:00
Christian Hopps
96db155acd lib: mgmtd: cleanup error value for native messaging
- Now if positive it's libyang LY_ERR, otherwise it's `-errno` value.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-17 03:04:59 -04:00
Christian Hopps
d57a6f761e mgmtd: allow dest DS "running" if implicit lock+commit
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-17 03:04:59 -04:00
Christian Hopps
0913d9fc0e lib: constify yang_resolve_snode_xpath results
Signed-off-by: Christian Hopps <chopps@labn.net>

ang
2024-09-17 03:04:59 -04:00
Donald Sharp
aab2946088
Merge pull request #16828 from enkechen-panw/print-rnh
zebra: include the prefix in nht show command
2024-09-16 09:30:53 -04:00
Louis Scalbert
cfd050a0e5 tests: update isisd fuzz test
Since the previous commit, if a router capability subTLV is not
readable, the previously read subTLVs are kept.

Update of the ISIS fuzz test.

> $ wuschl rebuild tests/isisd/test_fuzz_isis_tlv
> $ gzip -9 tests/isisd/test_fuzz_isis_tlv_tests.h

> $ ./test_fuzz_isis_tlv 2>/dev/null | grep failed
> Test 139 failed, output differs.
> Test 150 failed, output differs.
> 2 of 405 tests failed.
>
> $ ./test_fuzz_isis_tlv 139 2>/dev/null
> Test 139 failed, output differs.
> Expected output:
> Unpack log:
> Unpacking 564 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 193 and len 13.
>     Skipping unknown TLV 193 (13 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Received output:
> Unpack log:
> Unpacking 564 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 193 and len 13.
>     Skipping unknown TLV 193 (13 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Router Capability: 253.212.128.242 , D:1, S:1
>
> $ ./test_fuzz_isis_tlv 150 2>/dev/null
> Test 150 failed, output differs.
> Expected output:
> Unpack log:
> Unpacking 403 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 129 and len 13.
>     Unpacking Protocols Supported TLV...
>       Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
>   Unpacking TLV...
>     Found TLV of type 11 and len 11.
>     Skipping unknown TLV 11 (11 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
> Received output:
> Unpack log:
> Unpacking 403 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 129 and len 13.
>     Unpacking Protocols Supported TLV...
>       Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
>   Unpacking TLV...
>     Found TLV of type 11 and len 11.
>     Skipping unknown TLV 11 (11 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
> Router Capability: 253.212.128.242 , D:1, S:1

Link: https://pypi.org/project/wuschl/
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-09-16 14:53:03 +02:00
Louis Scalbert
d61758140d isisd: fix rcap tlv double-free crash
A double-free crash happens when a subTLV of the "Router Capability"
TLV is not readable and a previous "Router Capability" TLV was read.

rcap was supposed to be freed later by isis_free_tlvs() ->
free_tlv_router_cap(). In 78774bbcd5 ("isisd: add isis flex-algo lsp
advertisement"), this was not the case because rcap was not saved to
tlvs->router_cap when the function returned early because of a subTLV
length issue.

Always set tlvs->router_cap to free the memory.

Note that this patch has the consequence that in case of subTLV error,
the previously read "Router Capability" subTLVs are kept in memory.

Fixes: 49efc80d34 ("isisd: Ensure rcap is freed in error case")
Fixes: 78774bbcd5 ("isisd: add isis flex-algo lsp advertisement")
Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-09-16 14:47:38 +02:00
Donatas Abraitis
81db47a175
Merge pull request #16835 from cscarpitta/add-sid-structure-to-seg6local-nh
bgpd, lib: Include SID structure in seg6local nexthop
2024-09-16 10:25:56 +03:00
Carmine Scarpitta
1587169214 bgpd: Include structure when removing End.DT46 SID
Include SID structure information when removing an SRv6 End.DT46 SID
from the forwarding plane.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-15 21:35:13 +02:00
Carmine Scarpitta
a764fb9bd8 bgpd: Include structure when removing End.DT4/6 SID
Include SID structure information when removing an SRv6 End.DT4 or End.DT6 SID
from the forwarding plane.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-15 21:35:10 +02:00
Carmine Scarpitta
949ea04c2b bgpd: Include structure when installing End.DT46 SID
Include SID structure information when installing an SRv6 End.DT46 SID
in the forwarding plane.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-15 21:35:06 +02:00
Carmine Scarpitta
6343fe346e bgpd: Include structure when installing End.DT4/6 SID
Include SID structure information when installing an SRv6 End.DT6 or End.DT4 SID
in the forwarding plane.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-15 21:35:02 +02:00
Carmine Scarpitta
04025514ed lib: Include SID structure in seg6local nexthop
Include SID structure information in seg6local nexthop data structure.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-15 17:23:34 +02:00
Enke Chen
f6e28717ec zebra: include the prefix in nht show command
Include the prefix in "show ip nht" and "show ipv6 nht".

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-09-14 23:47:00 -07:00
Jafar Al-Gharaibeh
84c50356f1
Merge pull request #16827 from LabNConsulting/chopps/fix-on-error-with-xdist
improvements for xdist mode
2024-09-14 17:36:42 -05:00
Donald Sharp
f80b967302
Merge pull request #16829 from Jafaral/vty-json
pimd: use vty_json
2024-09-14 11:30:13 -04:00
Christian Hopps
98aaeab23c tests: fix spawning shells/vtysh on error in xdist mode
- Also fix the above and CLI when running in munet native mode

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-14 10:05:24 -04:00
Christian Hopps
68f25a1b74 tests: update munet 0.14.14, 0.14.15
- improvement to remote CLI
- 0.14.15 fixed a small bug in 0.14.14

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-14 10:05:19 -04:00
Jafar Al-Gharaibeh
fe0d1ede9d pimd: use vty_json
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-09-13 23:32:56 -05:00
Christian Hopps
45e42c15df tests: update munet 0.14.13
- Improve remote CLI operation [improves xdist mode]

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-13 21:21:13 -04:00
Christian Hopps
bac68aba6c tests: update munet 0.14.12
- Adds retry_sleep (i.e., interval) parameter to native @retry decorator
- Fix --stdout and --stderr munet CLI args

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-09-13 21:21:13 -04:00
Donald Sharp
f3fc33e17b
Merge pull request #16438 from Jafaral/pim-10.1-cand-rp
PIM candidate BSR/RP support
2024-09-13 19:45:57 -04:00
Jafar Al-Gharaibeh
38bd668b31
Merge pull request #16818 from ak503/ospf_gr
ospfd: missing '[no]ip ospf graceful-restart hello-delay <N>' commands
2024-09-13 11:57:56 -04:00
Donald Sharp
5074633d05
Merge pull request #16815 from opensourcerouting/fix/adjust_wait_count_default_timers_if_too_low
tests: Adjust minimum wait/count timers for run_and_expect() if they are too low
2024-09-13 11:27:19 -04:00
Jafar Al-Gharaibeh
53a0724446
Merge pull request #16808 from garyachy/nhrp_duplicate_authentication_extension_field
nhrpd: fixes duplicate auth extension
2024-09-13 10:50:40 -04:00
Dmitrii Turlupov
69e31a547f ospfd: fix missing '[no]ip ospf graceful-restart hello-delay <N>' commands
Signed-off-by: Dmitrii Turlupov <turlupov@bk.ru>
2024-09-13 16:26:04 +03:00
Donatas Abraitis
e229b5bad3 tests: Test neighbor X no-prepend replace-as dual-as
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-13 11:28:09 +03:00
Donatas Abraitis
573fa26bc7 doc: Document neighbox X local-as Y replace-as no-prepend dual-as
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-13 10:59:30 +03:00
Donatas Abraitis
cadfa693d6 bgpd: Implement BGP dual-as feature
This is helpful for migrations, etc.

The neighbor is configured with:

```
router bgp 65000
 neighbor X local-as 65001 no-prepend replace-as dual-as
```

Neighbor X can use either 65000, or 65001 to peer with.

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

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-13 10:51:41 +03:00