Jafar Al-Gharaibeh
5ae0b26220
Merge pull request #16856 from donaldsharp/ospf_vrf_debugs
...
ospfd: Add vrf name to debug functions in ospf_zebra.c
2024-09-18 11:26:50 -05:00
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
Andrew Cooks
b2526ddc3f
ospf6d: apply CI style suggestions
...
Apply formatting changes suggested by CI frrbot.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:17 +10:00
Andrew Cooks
9eef5e6483
ospf6d: use nth_prefix() in ospf6_intra_prefix_lsa_get_prefix_str()
...
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:17 +10:00
Andrew Cooks
6a7751b38a
ospf6d: use nth_prefix() in ospf6_link_lsa_get_prefix_str()
...
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:17 +10:00
Andrew Cooks
554350abe0
ospf6d: add nth_prefix()
...
Add utility function to find the Nth prefix in a link LSA or Intra
Prefix LSA.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:17 +10:00
Andrew Cooks
b3f72964f2
ospf6d: use nth_lsdesc() in ospf6_router_lsa_get_nbr_id()
...
Improves code readability by reducing pointer casting and arithmetic,
and intendation.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
8ea50a44b5
ospf6d: use nth_lsdesc() in ospf6_network_lsa_get_ar_id()
...
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
cd6d36fd82
ospf6d: add nth_lsdesc()
...
Add utility function to find the Nth router lsdesc or network lsdesc in
an LSA.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
d0366de57c
ospf6d: replace TLV_HDR_TOP macro with lsdesc_start function
...
The original TLV_HDR_TOP implementation only worked for Graceful Restart
LSAs, because they had no "LSA body".
This change introduces a body size lookup table and changes the
macro to a function that accounts for the LSA body for all LSA types,
and provides type checking on the provided pointer before arithmetic.
It also removes the open type casting and pointer arithmetic.
The introduced lsdesc_start() is used to find the start of a descriptor,
and will be used for TLVs in E-LSAs as well as old LSA.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
1bb4955371
ospf6d: use lsa_after_header pointer arithmetic
...
Replaces open type casting and pointer arithmetic for readability.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
1b64893e23
ospf6d: replace ospf6_lsa_header_end()
...
The void * return type of the replacement enables the removal of a
cast at every point of use, and the name no longer suggests that it
points to the last byte of the header.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
1290a06f5f
ospf6d: cleanup Router-LSAs Options bit order
...
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
33f90a5a1a
ospf6d: add space between multi-line macros
...
For readability
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
89e18bfad1
ospf6d: move lsa structs to ospf6_lsa.h
...
It will be cleaner to have the LSAs in a single header and the future
TLVs in a single header.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10:00
Andrew Cooks
7c9a79f182
ospf6d: factor out generic TLV handling
...
In preperation for Extended LSA types and their TLVs, factor out the TLV
handling from the Gracefull Restart functionality.
Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-09-16 18:38:16 +10: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