]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
22 months agoMerge pull request #13854 from chiragshah6/fdev2
Russ White [Tue, 27 Jun 2023 14:25:39 +0000 (10:25 -0400)]
Merge pull request #13854 from chiragshah6/fdev2

zebra: fix evpn rmac nh list cmp function

22 months agoMerge pull request #13851 from opensourcerouting/fix/use_zclient_sync_for_table_manager
Mark Stapp [Tue, 27 Jun 2023 12:54:46 +0000 (08:54 -0400)]
Merge pull request #13851 from opensourcerouting/fix/use_zclient_sync_for_table_manager

bgpd: Use synchronous Zebra client for table manager

22 months agoMerge pull request #13628 from kuldeepkash/uplink_mcast_tests
Donatas Abraitis [Tue, 27 Jun 2023 10:34:17 +0000 (13:34 +0300)]
Merge pull request #13628 from kuldeepkash/uplink_mcast_tests

tests: Add multicast-pim-multi-uplink test suite

22 months agoMerge pull request #13672 from zmw12306/AE_zero
Donatas Abraitis [Tue, 27 Jun 2023 10:18:20 +0000 (13:18 +0300)]
Merge pull request #13672 from zmw12306/AE_zero

babeld: add AE!=0 check when type is 7 or 10.

22 months agoMerge pull request #13722 from fdumontet6WIND/color_extcomm
Donatas Abraitis [Tue, 27 Jun 2023 10:03:22 +0000 (13:03 +0300)]
Merge pull request #13722 from fdumontet6WIND/color_extcomm

bgpd,lib,yang: add colored extended communities support

22 months agoMerge pull request #13857 from anlancs/doc-wrong-code
Donatas Abraitis [Tue, 27 Jun 2023 09:56:47 +0000 (12:56 +0300)]
Merge pull request #13857 from anlancs/doc-wrong-code

doc: Fix one syntax error for code block

22 months agobgpd: Guard zlog_debug for table manager when the connection is successful 13851/head
Donatas Abraitis [Tue, 27 Jun 2023 06:32:07 +0000 (09:32 +0300)]
bgpd: Guard zlog_debug for table manager when the connection is successful

We shouldn't use unguarded zlog_debug().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobgpd: Use zlog_err when can't connect to table manager (zebra)
Donatas Abraitis [Tue, 27 Jun 2023 06:29:52 +0000 (09:29 +0300)]
bgpd: Use zlog_err when can't connect to table manager (zebra)

If this an error, we should use zlog_err, not zlog_info as this is literally
not an information, but an error.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agodoc: Fix one syntax error for code block 13857/head
anlan_cs [Tue, 27 Jun 2023 05:19:28 +0000 (13:19 +0800)]
doc: Fix one syntax error for code block

The code block doesn't work due to special thing in front of it.
So, just make it work.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
22 months agozebra: fix evpn rmac nh list cmp function 13854/head
Chirag Shah [Mon, 26 Jun 2023 22:29:59 +0000 (15:29 -0700)]
zebra: fix evpn rmac nh list cmp function

EVPN RMAC (Router MAC) nexthop list compare
function needs to return all values so
the list element can be compared and added/deleted
properly.

Ticket:#3486989
Testing Done:
Originate EVPN Type-5 route with PIP IP and MAC as remote
nexthops.
Change the PIP IP address which triggers nexthop change.

Before fix:
When PIP IP changes RMAC is deleted from remote VTEPs.

TORS1# show evpn next-hops vni 4001 | include 00:02:00:00:00:2d
27.0.0.11       00:02:00:00:00:2d
TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d
00:02:00:00:00:2d 27.0.0.11

----- Remote VTEP change nexthop IP to 172.16.16.16 -----

TORS1# show evpn next-hops vni 4001 | include 00:02:00:00:00:2d
172.16.16.16    00:02:00:00:00:2d
TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d
TORS1#

After fix:
RMAC is retained as its nexthop list is not empty,
thus it is not deleted from remote VTEPs.

TORS1# show evpn rmac vni 4001 | include 00:02:00:00:00:2d
00:02:00:00:00:2d 172.16.16.16

Log:
2023/06/27 00:50:36.833474 ZEBRA: [XREH0-ZYMH6] L3VNI 4001 Remote VTEP
change(27.0.0.11 -> 172.16.16.16) for RMAC 00:02:00:00:00:2d

Signed-off-by: Chirag Shah <chirag@nvidia.com>
22 months agoMerge pull request #13804 from LabNConsulting/aceelindem/ospf6d-config-callbacks
Donald Sharp [Mon, 26 Jun 2023 18:59:13 +0000 (14:59 -0400)]
Merge pull request #13804 from LabNConsulting/aceelindem/ospf6d-config-callbacks

ospf6d: Add config callbacks to suppress hellos during config load.

22 months agoMerge pull request #13802 from LabNConsulting/aceelindem/ospfd-config-callbacks
Donald Sharp [Mon, 26 Jun 2023 18:58:03 +0000 (14:58 -0400)]
Merge pull request #13802 from LabNConsulting/aceelindem/ospfd-config-callbacks

ospfd: Add config callbacks and suppress hello during config load.

22 months agobgpd: Use synchronous Zebra client for table manager
Donatas Abraitis [Wed, 21 Jun 2023 21:20:53 +0000 (00:20 +0300)]
bgpd: Use synchronous Zebra client for table manager

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agodoc: extcommunity color 13722/head
Francois Dumontet [Sat, 10 Jun 2023 16:27:35 +0000 (18:27 +0200)]
doc: extcommunity color

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
22 months agobgpd: add functions related to srte_color management
Francois Dumontet [Fri, 9 Jun 2023 12:30:33 +0000 (14:30 +0200)]
bgpd: add functions related to srte_color management

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
22 months agotests: add bgp colored extended community test
Francois Dumontet [Thu, 25 May 2023 16:23:48 +0000 (18:23 +0200)]
tests: add bgp colored extended community test

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
22 months agobgpd: add colored extended communities support
Francois Dumontet [Mon, 22 May 2023 13:36:06 +0000 (15:36 +0200)]
bgpd: add colored extended communities support

add support of color extended community, conforming to RFC 9012.
This extended community will be added to the existing one, RT,SOO
and Node Target. The configuration will be made through the
route-map service.

find above a configuration example:

router bgp 65001
 bgp router-id 192.168.1.1
 no bgp ebgp-requires-policy
 no bgp network import-check
 neighbor 192.168.1.2 remote-as external
 neighbor 192.168.1.3 remote-as external
 neighbor 192.168.1.4 remote-as external
 address-family ipv4 unicast
  network 10.10.10.10/24 route-map rmap
  exit-address-family
!
  route-map rmap permit 10
   set extcommunity color 55555 200
  exit

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
22 months agoMerge pull request #13771 from mjstapp/opaque_notify
Donatas Abraitis [Mon, 26 Jun 2023 10:08:52 +0000 (13:08 +0300)]
Merge pull request #13771 from mjstapp/opaque_notify

lib, zebra, sharpd: add notifications for ZAPI opaque message registration events

22 months agoMerge pull request #13848 from LabNConsulting/chopps/clang-format-tweak
Donatas Abraitis [Mon, 26 Jun 2023 09:55:10 +0000 (12:55 +0300)]
Merge pull request #13848 from LabNConsulting/chopps/clang-format-tweak

tools: less aggressive settings for clang-format

22 months agoMerge pull request #13839 from LabNConsulting/chopps/nofiltermodule
Jafar Al-Gharaibeh [Mon, 26 Jun 2023 04:54:57 +0000 (23:54 -0500)]
Merge pull request #13839 from LabNConsulting/chopps/nofiltermodule

staticd: remove unused YANG module

22 months agotests: Add multicast-pim-multi-uplink-topo3 suite 13628/head
Kuldeep Kashyap [Tue, 30 May 2023 06:03:51 +0000 (11:33 +0530)]
tests: Add multicast-pim-multi-uplink-topo3 suite

Added 4 new test cases to verify multicast PIM
uplink(8 uplink) functionality.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
22 months agotests: Add multicast-pim-multi-uplink-topo2 suite
Kuldeep Kashyap [Tue, 30 May 2023 06:00:43 +0000 (11:30 +0530)]
tests: Add multicast-pim-multi-uplink-topo2 suite

Added 4 new test cases to verify multicast PIM
uplink(8 uplink) functionality.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
22 months agotools: less aggressive settings for clang-format 13848/head
Christian Hopps [Sun, 25 Jun 2023 12:13:25 +0000 (08:13 -0400)]
tools: less aggressive settings for clang-format

- Reports were that the current settings were choosing to extend beyond 80
columns too often. This change makes that more expensive but still tries
very hard to not break before first open parenthesis of function calls.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13845 from LabNConsulting/aceelindem/isis-config-end-error-log
Donatas Abraitis [Sat, 24 Jun 2023 20:35:58 +0000 (23:35 +0300)]
Merge pull request #13845 from LabNConsulting/aceelindem/isis-config-end-error-log

isisd: Log error when config-end timeout occurs.

22 months agoMerge pull request #13844 from LabNConsulting/aceelindem/bgp-config-callback-log
Donatas Abraitis [Sat, 24 Jun 2023 20:22:56 +0000 (23:22 +0300)]
Merge pull request #13844 from LabNConsulting/aceelindem/bgp-config-callback-log

bgpd: Add config-end timeout error log message.

22 months agoMerge pull request #13822 from SaiGomathiN/regF
Donatas Abraitis [Sat, 24 Jun 2023 20:22:10 +0000 (23:22 +0300)]
Merge pull request #13822 from SaiGomathiN/regF

pim, pim6d: pimreg interface is not getting added in a certain scenario

22 months agoisisd: Log error when config-end timeout occurs. 13845/head
Acee [Sat, 24 Jun 2023 17:43:03 +0000 (13:43 -0400)]
isisd: Log error when config-end timeout occurs.

Signed-off-by: Acee <aceelindem@gmail.com>
22 months agobgpd: Add config-end timemout error log message. 13844/head
Acee [Sat, 24 Jun 2023 17:29:24 +0000 (13:29 -0400)]
bgpd: Add config-end timemout error log message.

Signed-off-by: Acee <aceelindem@gmail.com>
22 months agostaticd: remove unused YANG module 13839/head
Christian Hopps [Fri, 23 Jun 2023 17:16:18 +0000 (13:16 -0400)]
staticd: remove unused YANG module

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agosharpd: support opaque zapi notifications 13771/head
Mark Stapp [Mon, 12 Jun 2023 20:14:45 +0000 (16:14 -0400)]
sharpd: support opaque zapi notifications

Add cli and support to sharpd to exercise the zapi opaque
'notification' features.

Signed-off-by: Mark Stapp <mjs@labn.net>
22 months agozebra: support notifications for opaque ZAPI messages
Mark Stapp [Wed, 31 May 2023 20:25:15 +0000 (16:25 -0400)]
zebra: support notifications for opaque ZAPI messages

Allow zapi clients to register to be notified when a server
for an  opaque message type is present. Zebra maintains these
notification registrations in the same data structures that it
uses for opaque message handling.

Signed-off-by: Mark Stapp <mjs@labn.net>
22 months agolib: add notifications for opaque zapi messages
Mark Stapp [Wed, 31 May 2023 20:22:16 +0000 (16:22 -0400)]
lib: add notifications for opaque zapi messages

Add a new notification zapi message type. A zapi client
that uses opaque messages can register to be notified
when a server for an opaque type is present.

Signed-off-by: Mark Stapp <mjs@labn.net>
22 months agolib, zebra: include source client zapi info in opaque messages
Mark Stapp [Mon, 29 May 2023 17:04:24 +0000 (13:04 -0400)]
lib, zebra: include source client zapi info in opaque messages

Include the sending zapi client info (proto, instance, and
session id) in each opaque zapi message. Add opaque 'init'
apis for clients who want to encode their opaque data inline,
into the zclient's internal stream buffer. Use these init apis
in the TE/link-state lib code, instead of hand-coding the
zapi opaque header info.

Signed-off-by: Mark Stapp <mjs@labn.net>
22 months agoospf6d: Add config callbacks to suppress hellos during config load. Add bgpd/isisd... 13804/head
Acee [Sun, 18 Jun 2023 11:22:45 +0000 (07:22 -0400)]
ospf6d: Add config callbacks to suppress hellos during config load. Add bgpd/isisd message.

Signed-off-by: Acee <aceelindem@gmail.com>
22 months agoospfd: Add config callbacks and suppress hello during config load. 13802/head
Acee [Thu, 15 Jun 2023 21:50:24 +0000 (17:50 -0400)]
ospfd: Add config callbacks and suppress hello during config load.

Signed-off-by: Acee <aceelindem@gmail.com>
22 months agoMerge pull request #13545 from idryzhov/remove-bond-slave
Donatas Abraitis [Fri, 23 Jun 2023 08:01:19 +0000 (11:01 +0300)]
Merge pull request #13545 from idryzhov/remove-bond-slave

zebra: remove ZEBRA_IF_BOND_SLAVE interface type

22 months agoMerge pull request #13823 from LabNConsulting/aceelindem/workflow-coverity-typo
Jafar Al-Gharaibeh [Thu, 22 Jun 2023 18:32:09 +0000 (13:32 -0500)]
Merge pull request #13823 from LabNConsulting/aceelindem/workflow-coverity-typo

doc: Fix typo in previous Coverity workflow doc commit.

22 months agoMerge pull request #13795 from LabNConsulting/chopps/mgmt-lock-cleanup
Jafar Al-Gharaibeh [Thu, 22 Jun 2023 18:31:27 +0000 (13:31 -0500)]
Merge pull request #13795 from LabNConsulting/chopps/mgmt-lock-cleanup

mgmt lock simplification

22 months agoMerge pull request #13824 from LabNConsulting/chopps/update-clang-format
Donatas Abraitis [Thu, 22 Jun 2023 11:07:23 +0000 (14:07 +0300)]
Merge pull request #13824 from LabNConsulting/chopps/update-clang-format

tools: import latest linux clang-format config w/ FRR mods

22 months agotools: import latest linux clang-format config w/ FRR mods 13824/head
Christian Hopps [Wed, 21 Jun 2023 13:32:39 +0000 (09:32 -0400)]
tools: import latest linux clang-format config w/ FRR mods

We modify the following from Linux Style:

    AlignEscapedNewlines: Left -> Right
    AlignTrailingComments: false -> true
    AlignConsecutiveMacros: false -> true
    ForEachMacros (replace linux with ours)

Don't break a string into multi-string-fragments

    PenaltyBreakString: 200

Allow going past the ColumnLimit to keep function arguments aligned
with the open parenthesis.

    PenaltyBreakBeforeFirstCallParameter: 200

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13825 from sri-mohan1/srib-ripng
Mark Stapp [Wed, 21 Jun 2023 20:27:01 +0000 (16:27 -0400)]
Merge pull request #13825 from sri-mohan1/srib-ripng

ripngd: changes for code maintainability

22 months agoMerge pull request #13731 from cyberstorm-mauritius/cid1519841
mobash-rasool [Wed, 21 Jun 2023 17:45:41 +0000 (23:15 +0530)]
Merge pull request #13731 from cyberstorm-mauritius/cid1519841

vrrp: check return value for turning off multicast for v6

22 months agoripngd: changes for code maintainability 13825/head
sri-mohan1 [Wed, 21 Jun 2023 16:56:43 +0000 (22:26 +0530)]
ripngd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
22 months agoMerge pull request #13797 from sri-mohan1/srib-ripng
Donatas Abraitis [Wed, 21 Jun 2023 14:00:00 +0000 (17:00 +0300)]
Merge pull request #13797 from sri-mohan1/srib-ripng

ripngd: changes for code maintainability

22 months agoMerge pull request #13790 from pguibert6WIND/set_aspath_exclude
Russ White [Wed, 21 Jun 2023 12:48:21 +0000 (08:48 -0400)]
Merge pull request #13790 from pguibert6WIND/set_aspath_exclude

bgpd: add 'set as-path exclude all' command

22 months agoMerge pull request #13780 from opensourcerouting/fix/use_sync_zapi_for_labels
Mark Stapp [Wed, 21 Jun 2023 11:49:07 +0000 (07:49 -0400)]
Merge pull request #13780 from opensourcerouting/fix/use_sync_zapi_for_labels

bgpd: Use synchronous way to get labels from Zebra

22 months agodoc: Fix typo in previous Coverity workflow doc commit. 13823/head
Acee Lindem [Wed, 21 Jun 2023 11:11:10 +0000 (07:11 -0400)]
doc: Fix typo in previous Coverity workflow doc commit.

Signed-off-by: Acee Lindem <aceelindem@gmail.com>
22 months agopim, pim6d: pimreg interface is not getting added in a certain scenario 13822/head
Sai Gomathi N [Wed, 21 Jun 2023 09:53:09 +0000 (02:53 -0700)]
pim, pim6d: pimreg interface is not getting added in a certain scenario

Problem:
When ipv6 pim configuration is removed from the IIF on FHR node,
if we wait for RST timer to expire and then add the ipv6 pim configuration on the IIF again,
it is seen that pimreg is not getting added due to which null register wont be sent,
the register flag state also remains NO_INFO forever instead of RegPrune.
The reason for this is, when RST timer expires and IIF is unknown for the (S,G) upstream,
the FHR state is not reset due to which when the RP becomes reachable,
upstream state changes from NotJoined to Join but the register suppress timer could not be started
since we see there is no change in FHR state.

Fix:
When the Register Timer expires and the reg state is set to PIM_REG_NOINFO,reset the FHR flag,
so that when the RP becomes reachable can be because of config change or RP not reachable,
it is able to resume its duty.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
22 months agozebra: Ignore non GR-aware zclient handling for BGP 13780/head
Donatas Abraitis [Mon, 19 Jun 2023 15:35:52 +0000 (18:35 +0300)]
zebra: Ignore non GR-aware zclient handling for BGP

This is for synchronous client (label/table manager) - aka session_id == 1.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobgpd: Do not initialize global variable zclient_sync to NULL
Donatas Abraitis [Mon, 19 Jun 2023 14:30:16 +0000 (17:30 +0300)]
bgpd: Do not initialize global variable zclient_sync to NULL

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agozebra: Show session id when printing an error when the client disconnects
Donatas Abraitis [Sun, 18 Jun 2023 19:07:54 +0000 (22:07 +0300)]
zebra: Show session id when printing an error when the client disconnects

Before:

```
2023/06/18 22:00:42 ZEBRA: [VXKFG-8SJRV][EC 4043309121] Client 'bgp' encountered an error and is shutting down.
2023/06/18 22:00:42 ZEBRA: [VXKFG-8SJRV][EC 4043309121] Client 'bgp' encountered an error and is shutting down.
```

After:

```
2023/06/18 22:06:44 ZEBRA: [N5M5Y-J5BPG][EC 4043309121] Client 'bgp' (session id 0) encountered an error and is shutting down.
2023/06/18 22:06:44 ZEBRA: [N5M5Y-J5BPG][EC 4043309121] Client 'bgp' (session id 1) encountered an error and is shutting down.
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobgpd: Reuse bgp_zebra_label_manager_ready() helper function
Donatas Abraitis [Sat, 17 Jun 2023 06:26:52 +0000 (09:26 +0300)]
bgpd: Reuse bgp_zebra_label_manager_ready() helper function

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobgpd: Retry connecting to synchronouse label manager if not ready
Donatas Abraitis [Sat, 17 Jun 2023 06:21:55 +0000 (09:21 +0300)]
bgpd: Retry connecting to synchronouse label manager if not ready

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agobgpd: Use synchronous way to get labels from Zebra
Donatas Abraitis [Mon, 12 Jun 2023 14:09:52 +0000 (17:09 +0300)]
bgpd: Use synchronous way to get labels from Zebra

Both the label manager and table manager zapi code send data requests via zapi
to zebra and then immediately listen for a response from zebra. The problem here
is of course that the listen part is throwing away any zapi command that is not
the one it is looking for.

ISIS/OSPF and PIM all have synchronous abilities via zapi, which they all
do through a special zapi connection to zebra. BGP needs to follow this model
as well. Additionally the new zclient_sync connection that should be created,
a once a second timer should wake up and read any data on the socket to
prevent problems too much data accumulating in the socket.

```
r3# sh bgp labelpool summary
Labelpool Summary
-----------------
Ledger:       3
InUse:        3
Requests:     0
LabelChunks:  1
Pending:      128
Reconnects:   1
r3# sh bgp labelpool inuse
Prefix                Label
---------------------------
10.0.0.1/32           16
192.168.31.0/24       17
192.168.32.0/24       18
r3#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agotests: Adjust tests for BGP LU labelpool output
Donatas Abraitis [Tue, 13 Jun 2023 19:12:39 +0000 (22:12 +0300)]
tests: Adjust tests for BGP LU labelpool output

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
22 months agoMerge pull request #13801 from LabNConsulting/chopps/latest-checkpatch
Jafar Al-Gharaibeh [Tue, 20 Jun 2023 15:41:01 +0000 (10:41 -0500)]
Merge pull request #13801 from LabNConsulting/chopps/latest-checkpatch

Import latest checkpatch.pl from linux

22 months agoMerge pull request #13800 from idryzhov/fix-rip-ripd-crash
Russ White [Tue, 20 Jun 2023 14:40:52 +0000 (10:40 -0400)]
Merge pull request #13800 from idryzhov/fix-rip-ripd-crash

fix crashes in rip and ripng

22 months agoMerge pull request #13809 from LabNConsulting/chopps/mgmtdoc
Jafar Al-Gharaibeh [Tue, 20 Jun 2023 14:04:55 +0000 (09:04 -0500)]
Merge pull request #13809 from LabNConsulting/chopps/mgmtdoc

doc: start of mgmtd developer doc

22 months agoMerge pull request #13811 from dpward/ospfv3-seqnum-wrap
Russ White [Tue, 20 Jun 2023 13:26:19 +0000 (09:26 -0400)]
Merge pull request #13811 from dpward/ospfv3-seqnum-wrap

ospf6d: Increment sequence number correctly in Authentication Trailer

22 months agoMerge pull request #13728 from opensourcerouting/fix/addpath_drop_non_best_addpaths
Russ White [Tue, 20 Jun 2023 13:20:36 +0000 (09:20 -0400)]
Merge pull request #13728 from opensourcerouting/fix/addpath_drop_non_best_addpaths

bgpd: Implement neighbor X addpath-tx-best-selected command

22 months agoMerge pull request #13750 from louis-6wind/fix-no-retain-memory-usage
Russ White [Tue, 20 Jun 2023 13:19:50 +0000 (09:19 -0400)]
Merge pull request #13750 from louis-6wind/fix-no-retain-memory-usage

bgpd: fix memory usage of vpn no retain

22 months agoMerge pull request #13758 from cscarpitta/bugfix/fix-read-beyond-stream-isis-asla
Russ White [Tue, 20 Jun 2023 13:19:23 +0000 (09:19 -0400)]
Merge pull request #13758 from cscarpitta/bugfix/fix-read-beyond-stream-isis-asla

isisd: Fix read beyond end of stream of ASLA Sub-TLV parsing

22 months agoMerge pull request #13769 from opensourcerouting/fix/bgp_peer-group_show_advertised
Russ White [Tue, 20 Jun 2023 13:18:52 +0000 (09:18 -0400)]
Merge pull request #13769 from opensourcerouting/fix/bgp_peer-group_show_advertised

bgpd: Allow using peer-group for listing advertised-routes, etc.

22 months agoMerge pull request #13665 from pguibert6WIND/issue_13616_pr
Russ White [Tue, 20 Jun 2023 13:18:16 +0000 (09:18 -0400)]
Merge pull request #13665 from pguibert6WIND/issue_13616_pr

topotests: label per nexthop test adds add a while loop for mpls table

22 months agoMerge pull request #13666 from pguibert6WIND/issue_13638_pr
Russ White [Tue, 20 Jun 2023 13:17:51 +0000 (09:17 -0400)]
Merge pull request #13666 from pguibert6WIND/issue_13638_pr

topotests: structural issues in bgp_local_as_dotplus_private_remove

22 months agoMerge pull request #13524 from pguibert6WIND/mpls_vpn_lsr_redistribute
Russ White [Tue, 20 Jun 2023 13:13:33 +0000 (09:13 -0400)]
Merge pull request #13524 from pguibert6WIND/mpls_vpn_lsr_redistribute

MPLS vpn LSR redistribute

22 months agoMerge pull request #13557 from anlancs/fix/bgpd-evpn-rmac-best-path
Russ White [Tue, 20 Jun 2023 13:12:51 +0000 (09:12 -0400)]
Merge pull request #13557 from anlancs/fix/bgpd-evpn-rmac-best-path

bgpd: Fix missing deletion of evpn routes

22 months agoMerge pull request #13394 from mjstapp/fix_zebra_mpls_config
Russ White [Tue, 20 Jun 2023 13:10:53 +0000 (09:10 -0400)]
Merge pull request #13394 from mjstapp/fix_zebra_mpls_config

zebra: clarify interface-level mpls config

22 months agoMerge pull request #12971 from taspelund/trey/mac_vrf_soo_upstream
Russ White [Tue, 20 Jun 2023 13:08:28 +0000 (09:08 -0400)]
Merge pull request #12971 from taspelund/trey/mac_vrf_soo_upstream

bgpd: Add MAC-VRF Site-of-Origin support

22 months agoMerge pull request #13810 from chiragshah6/fdev2
mobash-rasool [Tue, 20 Jun 2023 07:15:18 +0000 (12:45 +0530)]
Merge pull request #13810 from chiragshah6/fdev2

vrrpd: add priority field into interface json

22 months agotopotests: label per nexthop test adds add a while loop for mpls table 13665/head
Philippe Guibert [Fri, 2 Jun 2023 08:55:07 +0000 (10:55 +0200)]
topotests: label per nexthop test adds add a while loop for mpls table

The bgp_vpnv4_per_nexthop_label tests only check to see if the mpls labels
are installed one time. Test runs show that all but one label is installed.
More than likely the test has asked for data while zebra is still installing
it. the mpls_label_check functions must check this result multiple times as
that system may be under heavy load.

A loop is introduced in order to let zebra check the mpls table.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agotopotests: structural issues in bgp_local_as_dotplus_private_remove 13666/head
Philippe Guibert [Fri, 2 Jun 2023 10:05:18 +0000 (12:05 +0200)]
topotests: structural issues in bgp_local_as_dotplus_private_remove

This test has several issues:
A) The convergence function is spamming the show neighbor command until success,
if the neighbor never comes up the test will never finish. This adds unnecessary
load to an already loaded test system.  Use run_and_expect to properly wait for
the neighbor relationship to come up.
B) The convergence function should not sleep for 1 second *After* the neighbor
is established
C) The _bgp_as_path() function fails if the prefix has not been received yet.
This looking for the prefix data should be within a run_and_expect() functionality.
Else a loaded test system will fail in this function because while we may be in
an established state, prefixes might not yet have been exchanged and there is no
point in failing the test without giving the system some time to actually converge.

Fix those points, similarly to what has been fixed in
bgp_local_as_private_remove test.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agotools: checkpatch: FRR modifications to linux checkpatch.pl 13801/head
Christian Hopps [Thu, 15 Jun 2023 20:07:31 +0000 (16:07 -0400)]
tools: checkpatch: FRR modifications to linux checkpatch.pl

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agodoc: add the linux doc for checkpatch.pl
Christian Hopps [Tue, 20 Jun 2023 05:03:46 +0000 (01:03 -0400)]
doc: add the linux doc for checkpatch.pl

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agotools: unmodified import of scripts/checkpatch.pl from linux
Christian Hopps [Thu, 15 Jun 2023 17:37:14 +0000 (13:37 -0400)]
tools: unmodified import of scripts/checkpatch.pl from linux

0ee3e7b8893e * checkpatch: get default codespell dictionary path from package location

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agodoc: start of mgmtd developer doc 13809/head
Christian Hopps [Mon, 19 Jun 2023 08:57:48 +0000 (04:57 -0400)]
doc: start of mgmtd developer doc

- docs on how to convert daemon to mgmtd and some diagrams
- and a fix for code-block in cspf.rst

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoospf6d: Increment sequence number correctly in Authentication Trailer 13811/head
David Ward [Mon, 19 Jun 2023 20:00:38 +0000 (16:00 -0400)]
ospf6d: Increment sequence number correctly in Authentication Trailer

According to RFC 7166, the sequence number should be treated as an
unsigned 64-bit value, although it is stored as two 32-bit values.

When incrementing it, the code caused the lower-order 32-bit value
to skip from 0xFFFFFFFE to 0. As a side effect, an error was never
produced if the full 64-bit sequence number wrapped.

Fixes: #13805
Signed-off-by: David Ward <david.ward@ll.mit.edu>
22 months agovrrpd: add priority field into interface json 13810/head
Sindhu Parvathi Gopinathan [Mon, 19 Jun 2023 07:56:35 +0000 (00:56 -0700)]
vrrpd: add priority field into interface json

'Priority' attribute is missing in "show vrrp interface <intf> json"
output. Whereas it is there in non-json output.

It has been added now in show vrrp interface json output.

Before Fix:

```
vrrp1# show vrrp interface swp5.101 json
[
  {
    "vrid":2,
    "version":3,
    "autoconfigured":false,
    "shutdown":false,
    "preemptMode":true,
    "acceptMode":true,
    "interface":"swp5.101",
    "advertisementInterval":1000,
    "v4":{
      "interface":"vrrp4-11-2",
      "vmac":"00:00:5e:00:01:02",
      "primaryAddress":"50.0.0.2",
      "status":"Master",
      "effectivePriority":110,
      "masterAdverInterval":1000,
      "skewTime":570,
      "masterDownInterval":3570,
      "stats":{
        "adverTx":248456,
        "adverRx":1,
        "garpTx":1,
        "transitions":2
      },
      "addresses":[
        "50.0.0.1"
      ]
    },
    "v6":{
      "interface":"vrrp6-11-2",
      "vmac":"00:00:5e:00:02:02",
      "primaryAddress":"fe80::7f1:49e7:768c:aa73",
      "status":"Master",
      "effectivePriority":110,
      "masterAdverInterval":1000,
      "skewTime":570,
      "masterDownInterval":3570,
      "stats":{
        "adverTx":248455,
        "adverRx":1,
        "neighborAdverTx":1,
        "transitions":2
      },
      "addresses":[
        "2001:50::1"
      ]
    }
  }
]
vrrp1#
```

After Fix:

```
vrrp1# show vrrp interface swp5.101 json
[
  {
    "vrid":2,
    "version":3,
    "autoconfigured":false,
    "shutdown":false,
    "preemptMode":true,
    "acceptMode":true,
    "interface":"swp5.101",
    "advertisementInterval":1000,
    "priority":110, ====> priority added into json output
    "v4":{
      "interface":"vrrp4-11-2",
      "vmac":"00:00:5e:00:01:02",
      "primaryAddress":"50.0.0.2",
      "status":"Master",
      "effectivePriority":110,
      "masterAdverInterval":1000,
      "skewTime":570,
      "masterDownInterval":3570,
      "stats":{
        "adverTx":15,
        "adverRx":4,
        "garpTx":1,
        "transitions":2
      },
      "addresses":[
        "50.0.0.1"
      ]
    },
    "v6":{
      "interface":"vrrp6-11-2",
      "vmac":"00:00:5e:00:02:02",
      "primaryAddress":"fe80::7f1:49e7:768c:aa73",
      "status":"Master",
      "effectivePriority":110,
      "masterAdverInterval":1000,
      "skewTime":570,
      "masterDownInterval":3570,
      "stats":{
        "adverTx":13,
        "adverRx":5,
        "neighborAdverTx":1,
        "transitions":2
      },
      "addresses":[
        "2001:50::1"
      ]
    }
  }
]
```

Ticket:#3502432

Issue:3502432

Testing: UT done

Signed-off-by: Sindhu Parvathi Gopinathan's <sgopinathan@nvidia.com>
22 months agobgpd: add 'set as-path exclude all' command 13790/head
Philippe Guibert [Tue, 13 Jun 2023 12:53:03 +0000 (14:53 +0200)]
bgpd: add 'set as-path exclude all' command

It is not possible to flush all the incoming as-path list
from a given BGP update.

Add a route-map set command to remove all as-paths
from a given AS path. Add the necessary tests.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
22 months agoripngd: changes for code maintainability 13797/head
sri-mohan1 [Wed, 14 Jun 2023 18:24:07 +0000 (23:54 +0530)]
ripngd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
22 months agomgmtd: fix memleak 13795/head
Christian Hopps [Sun, 18 Jun 2023 17:39:27 +0000 (13:39 -0400)]
mgmtd: fix memleak

Use northbound functions for replace and merge when possible, rather
than duplicating the code.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agomgmtd: KISS the locking code
Christian Hopps [Sun, 18 Jun 2023 20:19:54 +0000 (16:19 -0400)]
mgmtd: KISS the locking code

Move away from things like "lock if not locked" type code, require the
user has locked prior to geting to that point.

For now we warn if we are taking a lock we already had; however, this
should really be a failure point.

New requirements:

SETCFG -
  not implicit commit - requires user has locked candidate DS and they
    must unlock after

  implicit commit - requires user has locked candidate and running DS
    both locks will be unlocked on reply to the SETCFG

COMMITCFG -
  requires user has locked candidate and running DS and they must unlock
  after

  rollback - this code now get both locks and then does an unlock and
  early return thing on the adapter side. It needs to be un-special
  cased in follow up work that would also include tests for this
  functionality.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agomgmtd: simplify locking, removing read locks
Christian Hopps [Wed, 14 Jun 2023 13:32:16 +0000 (09:32 -0400)]
mgmtd: simplify locking, removing read locks

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: use short-circuit for locking
Christian Hopps [Mon, 12 Jun 2023 08:59:19 +0000 (04:59 -0400)]
lib: mgmtd: use short-circuit for locking

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agolib: mgmtd: re-purpose is_short_circuit and fix depth variable inc/dec
Christian Hopps [Fri, 16 Jun 2023 11:19:53 +0000 (07:19 -0400)]
lib: mgmtd: re-purpose is_short_circuit and fix depth variable inc/dec

`is_short_circuit` now is set to true when a message is being
short-circuit handled.

`short_circuit_depth` was being inc/dec inside conditional macro, move
that out of the macro.

Signed-off-by: Christian Hopps <chopps@labn.net>
22 months agoMerge pull request #13798 from donaldsharp/bgp_suppression
Donatas Abraitis [Sun, 18 Jun 2023 08:58:08 +0000 (11:58 +0300)]
Merge pull request #13798 from donaldsharp/bgp_suppression

bgpd: some safi's do not mix with bgp suppress-fib

22 months agoMerge pull request #13765 from AbhishekNR/query-max-response-time
Donatas Abraitis [Sun, 18 Jun 2023 08:48:29 +0000 (11:48 +0300)]
Merge pull request #13765 from AbhishekNR/query-max-response-time

pim6d: Correcting the help string

22 months agoMerge pull request #13796 from anlancs/doc-wrong-code-block
Donatas Abraitis [Sun, 18 Jun 2023 08:35:29 +0000 (11:35 +0300)]
Merge pull request #13796 from anlancs/doc-wrong-code-block

doc: Fix one syntax error for code block

22 months agotopotests: import vpn to default vrf in bgp_vpnv4_noretain 13750/head
Louis Scalbert [Thu, 8 Jun 2023 11:42:30 +0000 (13:42 +0200)]
topotests: import vpn to default vrf in bgp_vpnv4_noretain

Test that importing VPN prefixes into the default VRF is possible with
the no retain feature.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotopotests: more tests in bgp_vpnv4_noretain
Louis Scalbert [Thu, 8 Jun 2023 11:42:30 +0000 (13:42 +0200)]
topotests: more tests in bgp_vpnv4_noretain

Add more VRFs in bgp_vpnv4_noretain and test combinations of no-retain
/ retain and import / un-import.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotopotests: check protocol convergence at init in bgp_vpnv4_noretain
Louis Scalbert [Wed, 14 Jun 2023 09:05:01 +0000 (11:05 +0200)]
topotests: check protocol convergence at init in bgp_vpnv4_noretain

Check that the BGP session is Established before starting the tests.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotopotests: check r2 vpn table in bgp_vpnv4_noretain
Louis Scalbert [Thu, 8 Jun 2023 12:34:22 +0000 (14:34 +0200)]
topotests: check r2 vpn table in bgp_vpnv4_noretain

Remove no retain in r2 and check that r2 VPN table remains the same
after r1 configuration changes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotopotests: do not import r1 vrf1 to itself bgp_vpnv4_noretain
Louis Scalbert [Thu, 8 Jun 2023 12:27:12 +0000 (14:27 +0200)]
topotests: do not import r1 vrf1 to itself bgp_vpnv4_noretain

Do not import r1 vrf1 to itself in order to check that r1 vrf1 prefixes
are only in VPN table because it is needed for advertising the prefixes
to other routers.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotopotests: filter out void RD in bgp_vpnv4_noretain
Louis Scalbert [Thu, 8 Jun 2023 10:52:44 +0000 (12:52 +0200)]
topotests: filter out void RD in bgp_vpnv4_noretain

Filter out route-distinguishers that have no prefix in "show bgp table
json"

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotopotests: router relative variables in bgp_vpnv4_noretain
Louis Scalbert [Thu, 8 Jun 2023 10:27:18 +0000 (12:27 +0200)]
topotests: router relative variables in bgp_vpnv4_noretain

Change IP addresses, label, RD and RT to match the router number
and VRF number.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotopotests: apply style to bgp_vpnv4_noretain
Louis Scalbert [Tue, 6 Jun 2023 15:52:11 +0000 (17:52 +0200)]
topotests: apply style to bgp_vpnv4_noretain

Apply style cosmetic changes to bgp_vpnv4_noretain with "black".

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agotopotests: cosmetic changes to bgp_vpnv4_noretain
Louis Scalbert [Tue, 6 Jun 2023 15:00:18 +0000 (17:00 +0200)]
topotests: cosmetic changes to bgp_vpnv4_noretain

Cosmetic changes to bgp_vpnv4_noretain to prepare the next commit.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agobgpd: fix incorrect json output in bgp_show_table_rd()
Louis Scalbert [Wed, 7 Jun 2023 13:15:30 +0000 (15:15 +0200)]
bgpd: fix incorrect json output in bgp_show_table_rd()

'{}' extra output may present JSON output from bgp_show_table_rd() when
no prefix are seen.

> {
>  "vrfId": 0,
>  "vrfName": "default",
>  "tableVersion": 0,
>  "routerId": "1.1.1.1",
>  "defaultLocPrf": 100,
>  "localAS": 65500,
>  "routes": {  "routeDistinguishers" : { "444:1" : {  }  }  }  }
> {}

Do not output '{}' when bgp_show_table() returns a valid JSON.
Tested without rd in config, bgp_show_table() returns nothing and the
JSON output is only '{}'

Fixes: 0224b3296c ("bgpd: Print empty JSON `{}` if no entries under `show bgp ipv4 vpn json`")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agobgpd: cleanup un-imported vpn prefix if no retain set
Louis Scalbert [Wed, 7 Jun 2023 10:46:30 +0000 (12:46 +0200)]
bgpd: cleanup un-imported vpn prefix if no retain set

After some VRF imports are removed and "no bgp retain route-target all"
is set, prefixes that are not imported anymore remain in the BGP table.

Parse the BGP table and remove un-imported prefixes in such a case.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
22 months agobgpd: fix memory usage of vpn no retain
Louis Scalbert [Tue, 6 Jun 2023 10:46:21 +0000 (12:46 +0200)]
bgpd: fix memory usage of vpn no retain

By default, bgpd stores all MPLS VPN SAFI prefixes unless the "no bgp
retain route-target all" option is used to store only prefixes that are
imported into local VRFs. The "no retain" option temporarily uses too
much memory, as all prefixes are stored in memory before the deletion of
non-imported prefixes is done.

Filter out non-imported prefixes before they are set into the BGP adj
RIB out.

Fixes: a486300b26 ("bgpd: implement retain route-target all behaviour")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>