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
Shbinging
be32e8afba
ospfd: fix no ip ospf dead-interval minimal hello-multiplier syntax
...
Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
2024-09-18 15:39:55 +08: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
Joshua Muthii
97a03685e8
nhrpd: Implement retrying resolution request
...
In the event that a resolution request is sent and
and resolution reply is never received, resolution
requests will continue to be sent until either the
newly created shortcut has been purged or a resolution
reply is finally received.
NHRPD_DEFAULT_PURGE_TIME and NHRPD_PURGE_EXPIRE are values
that were previously hardcoded and moved into macros for
the sake of readability.
Signed-off-by: Joshua Muthii <jmuthii@labn.net>
2024-09-17 12:44:41 -04: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
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