]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
12 months agobgpd: fix addressing information of non established outgoing sessions 15686/head
Philippe Guibert [Fri, 5 Apr 2024 07:55:05 +0000 (09:55 +0200)]
bgpd: fix addressing information of non established outgoing sessions

When trying to connect to a BGP peer that does not respons, the 'show
bgp neighbors' command does not give any indication on the local and
remote addresses used:

> # show bgp neighbors
>  BGP neighbor is 192.0.2.150, remote AS 65500, local AS 65500, internal link
>   Local Role: undefined
>   Remote Role: undefined
>   BGP version 4, remote router ID 0.0.0.0, local router ID 192.0.2.1
>   BGP state = Connect
> [..]
>   Connections established 0; dropped 0
>   Last reset 00:00:04,   Waiting for peer OPEN (n/a)
>   Internal BGP neighbor may be up to 255 hops away.
> BGP Connect Retry Timer in Seconds: 120
> Next connect timer due in 117 seconds
> Read thread: off  Write thread: off  FD used: 27

The addressing information (address and port) are only available
when TCP session is established, whereas this information is present
at the system level:

> root@ubuntu2204:~# netstat -pan | grep 192.0.2.1
> tcp        0      0 192.0.2.1:179           192.0.2.150:38060       SYN_RECV    -
> tcp        0      1 192.0.2.1:46526         192.0.2.150:179         SYN_SENT    488310/bgpd

Add the display for outgoing BGP session, as the information in
the getsockname() API provides information for connected streams.
When getpeername() API does not give any information, use the peer
configuration (destination port is encoded in peer->port).

> # show bgp neighbors
> BGP neighbor is 192.0.2.150, remote AS 65500, local AS 65500, internal link
>   Local Role: undefined
>   Remote Role: undefined
>   BGP version 4, remote router ID 0.0.0.0, local router ID 192.0.2.1
>   BGP state = Connect
> [..]
>   Connections established 0; dropped 0
>   Last reset 00:00:16,   Waiting for peer OPEN (n/a)
> Local host: 192.0.2.1, Local port: 46084
> Foreign host: 192.0.2.150, Foreign port: 179

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agobgpd: remove useless control checks about TCP connection
Philippe Guibert [Fri, 5 Apr 2024 11:52:27 +0000 (13:52 +0200)]
bgpd: remove useless control checks about TCP connection

When attempting to get the src and destination addresses of a given
connection, the API may return the NULL pointer, but further code
in bgp_zebra_nexthop_set() already does a check about the given
pointer.

Relaxing the error code for all the returned adressing.

Fixes: 1ff9a340588a ("bgpd: bgpd-fsm-fix.patch")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agoMerge pull request #15592 from pguibert6WIND/fix_srte_color
Donatas Abraitis [Sun, 14 Apr 2024 18:09:47 +0000 (21:09 +0300)]
Merge pull request #15592 from pguibert6WIND/fix_srte_color

bgpd: fix register NHT with appropriate colored ext. community

12 months agoMerge pull request #15612 from sri-mohan1/srib-24-zebra-b
Donatas Abraitis [Sun, 14 Apr 2024 18:06:28 +0000 (21:06 +0300)]
Merge pull request #15612 from sri-mohan1/srib-24-zebra-b

zebra: changes for code maintainability

12 months agoMerge pull request #15731 from anlancs/bgpd-add-gr-fsm
Donatas Abraitis [Sat, 13 Apr 2024 20:19:49 +0000 (23:19 +0300)]
Merge pull request #15731 from anlancs/bgpd-add-gr-fsm

bgpd: adjust checking return value for commands

12 months agoMerge pull request #15727 from donaldsharp/evpn_zebra_interactions
Donatas Abraitis [Sat, 13 Apr 2024 19:19:10 +0000 (22:19 +0300)]
Merge pull request #15727 from donaldsharp/evpn_zebra_interactions

Evpn zebra interactions

12 months agobgpd: prompt should be given only for the real change 15731/head
anlan_cs [Fri, 12 Apr 2024 14:56:41 +0000 (22:56 +0800)]
bgpd: prompt should be given only for the real change

Prompt nothing for an empty (and failed) operation.  Take
`bgp graceful-restart` as an example:

Before:
```
anlan(config-router)# bgp graceful-restart
Graceful restart configuration changed, reset all peers to take effect
anlan(config-router)# bgp graceful-restart
Graceful restart configuration changed, reset all peers to take effect
anlan(config-router)#
```

After:
```
anlan(config-router)# bgp graceful-restart
Graceful restart configuration changed, reset all peers to take effect
anlan(config-router)# bgp graceful-restart
anlan(config-router)#
```

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agobpgd: adjust return value for the same command
anlan_cs [Fri, 12 Apr 2024 13:57:30 +0000 (21:57 +0800)]
bpgd: adjust return value for the same command

The same command should be accepted, it is an empty operation.  Take
`neighbor <X> graceful-restart-helper` as an example:

Before:
```
anlan(config-router)# neighbor 3.3.3.3 graceful-restart-helper
Graceful restart configuration changed, reset this peer to take effect
anlan(config-router)# neighbor 3.3.3.3 graceful-restart-helper
Graceful restart configuration changed, reset this peer to take effect
% The Graceful Restart command used is not valid at this moment.
anlan(config-router)#
```

After:
```
anlan(config-router)# neighbor 3.3.3.3 graceful-restart-helper
Graceful restart configuration changed, reset this peer to take effect
anlan(config-router)# neighbor 3.3.3.3 graceful-restart-helper
Graceful restart configuration changed, reset this peer to take effect
anlan(config-router)#
```

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agoMerge pull request #15697 from zmw12306/bfd_check_Mflag
Igor Ryzhov [Fri, 12 Apr 2024 13:09:43 +0000 (16:09 +0300)]
Merge pull request #15697 from zmw12306/bfd_check_Mflag

bfdd: Add check for flag Multipoint (M)

12 months agobgpd: Convert int's to bool in a couple of spots 15727/head
Donald Sharp [Thu, 11 Apr 2024 17:47:57 +0000 (13:47 -0400)]
bgpd: Convert int's to bool in a couple of spots

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
12 months agobgpd: Increase install/uninstall speed of evpn vpn vni's
Donald Sharp [Thu, 11 Apr 2024 17:28:30 +0000 (13:28 -0400)]
bgpd: Increase install/uninstall speed of evpn vpn vni's

BGP receives notification from zebra about an vpn that
needs to be installed into the evpn tables.  Unfortunately
this function was walking the entirety of evpn tables
3 times.  Modify the code to walk the tree 1 time and
to just look for the needed route types as you go.

This reduces, in a scaled environment, processing
time of the zclient_read function from 130 seconds
to 95 seconds.  For a up / down / up interface
scenario.

Signed-off-by: Rajasekar Raja <rajasekarr@vndia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
12 months agoMerge pull request #15688 from mjstapp/dplane_api_version
Jafar Al-Gharaibeh [Fri, 12 Apr 2024 04:54:02 +0000 (23:54 -0500)]
Merge pull request #15688 from mjstapp/dplane_api_version

lib, zebra: Add a version scheme for the dataplane API

12 months agobfdd: add check for flag M 15697/head
zmw12306 [Sun, 7 Apr 2024 20:19:38 +0000 (16:19 -0400)]
bfdd:  add check for flag M

Signed-off-by: zmw12306 <zmw12306@gmail.com>
12 months agoMerge pull request #15710 from acooks-at-bda/bugfix/fix-indent-byte-handling
Donald Sharp [Thu, 11 Apr 2024 12:25:15 +0000 (08:25 -0400)]
Merge pull request #15710 from acooks-at-bda/bugfix/fix-indent-byte-handling

tools/indent.py: fix encoded byte stream handling

12 months agoMerge pull request #15661 from routingrocks/master
Donatas Abraitis [Thu, 11 Apr 2024 10:44:00 +0000 (13:44 +0300)]
Merge pull request #15661 from routingrocks/master

pimd:  pim mlag summary should display the down connection status.

12 months agoMerge pull request #15719 from pguibert6WIND/show_bgp_neighbors_extra_line
Donatas Abraitis [Thu, 11 Apr 2024 10:40:06 +0000 (13:40 +0300)]
Merge pull request #15719 from pguibert6WIND/show_bgp_neighbors_extra_line

bgpd: fix 'show bgp neighbors' output

12 months agoMerge pull request #15582 from donaldsharp/zebra_rtadv_use_without_init
Donatas Abraitis [Wed, 10 Apr 2024 17:58:35 +0000 (20:58 +0300)]
Merge pull request #15582 from donaldsharp/zebra_rtadv_use_without_init

Zebra rtadv use without init

12 months agotests: Cleanup generate_support_bundle() to not fail 15582/head
Donald Sharp [Tue, 19 Mar 2024 23:30:41 +0000 (19:30 -0400)]
tests: Cleanup generate_support_bundle() to not fail

The Support bundle generation was/is failing in both
our upstream ci and locally.  This cleans up the failures
that I am seeing such that tests now continue to run
instead of aborting the test run.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
12 months agozebra: rtadv uses uninited data to sendmsg
Donald Sharp [Tue, 19 Mar 2024 22:29:31 +0000 (18:29 -0400)]
zebra: rtadv uses uninited data to sendmsg

valgrind is complaining about this problem.
This fixes it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
12 months agobgpd: fix 'show bgp neighbors' output 15719/head
Philippe Guibert [Wed, 10 Apr 2024 12:13:54 +0000 (14:13 +0200)]
bgpd: fix 'show bgp neighbors' output

The 'show bgp neighbors' output appends additional lines after GR mode
helpers.

> # show bgp neighbors
> [..]
>     End-of-RIB received: IPv4 VPN
>     Local GR Mode: Helper*
>
>     Remote GR Mode: Helper
>
>     R bit: True
>

Fix this by not appending the extra line feed.

> # show bgp neighbors
> [..]
>     End-of-RIB received: IPv4 VPN
>     Local GR Mode: Helper*
>     Remote GR Mode: Helper
>     R bit: True

Fixes: 0e4e879b4084 ("bgpd: fix silly format string SNAFU")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agoMerge pull request #13627 from anlancs/pimd/pimreg-vrf-add-break
mobash-rasool [Wed, 10 Apr 2024 11:20:07 +0000 (16:50 +0530)]
Merge pull request #13627 from anlancs/pimd/pimreg-vrf-add-break

pimd: Set pimreg interface with one master

12 months agotools/indent.py: fix encoded byte stream handling 15710/head
Andrew Cooks [Tue, 9 Apr 2024 05:39:14 +0000 (15:39 +1000)]
tools/indent.py: fix encoded byte stream handling

Python subprocess communication now operates on bytes, not strings.

Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
12 months agoMerge pull request #15708 from donaldsharp/zebra_fix_io_display
Donatas Abraitis [Wed, 10 Apr 2024 05:26:02 +0000 (08:26 +0300)]
Merge pull request #15708 from donaldsharp/zebra_fix_io_display

Zebra fix io display and shorten evpn zapi packet sizes

12 months agoMerge pull request #15624 from raja-rajasekar/rajasekarr/backpressure_bgp_zebra_clien...
Donatas Abraitis [Wed, 10 Apr 2024 05:22:25 +0000 (08:22 +0300)]
Merge pull request #15624 from raja-rajasekar/rajasekarr/backpressure_bgp_zebra_client_EVPN

bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation

12 months agoMerge pull request #15711 from louis-6wind/fix_test_table_version
Donald Sharp [Tue, 9 Apr 2024 22:34:13 +0000 (18:34 -0400)]
Merge pull request #15711 from louis-6wind/fix_test_table_version

topotests: do not check table version

12 months agoMerge pull request #15693 from anlancs/fix/zebra-label-bind
Donald Sharp [Tue, 9 Apr 2024 22:33:29 +0000 (18:33 -0400)]
Merge pull request #15693 from anlancs/fix/zebra-label-bind

zebra: fix wrong check for mpls label

12 months agoMerge pull request #15660 from LabNConsulting/acee/ospf-p2mp-non-broadcast
Russ White [Tue, 9 Apr 2024 15:56:34 +0000 (11:56 -0400)]
Merge pull request #15660 from LabNConsulting/acee/ospf-p2mp-non-broadcast

ospfd: Implement non-broadcast support for point-to-multipoint networks

12 months agozebra: Use more appropriately sized stream packets for evpn 15708/head
Donald Sharp [Mon, 8 Apr 2024 20:29:57 +0000 (16:29 -0400)]
zebra: Use more appropriately sized stream packets for evpn

When sending EVPN data, let's use more appropriately sized
packets for the sending of data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
12 months agozebra: Actually display I/O buffer sizes
Donald Sharp [Mon, 8 Apr 2024 20:24:05 +0000 (16:24 -0400)]
zebra: Actually display I/O buffer sizes

An operator found a situation where zebra was
backing up in a significant way towards BGP
with EVPN changes taking up some serious amounts
of memory.  The key lines that would have clued
us in on it were behind a dev build.  Let's change
this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
12 months agodoc: add doc about the zebra dataplane api version 15688/head
Mark Stapp [Mon, 8 Apr 2024 18:23:58 +0000 (14:23 -0400)]
doc: add doc about the zebra dataplane api version

Add a block to the dev doc about the dataplane api version.

Signed-off-by: Mark Stapp <mjs@cisco.com>
12 months agozebra: add dataplane API version value
Mark Stapp [Fri, 5 Apr 2024 17:32:08 +0000 (13:32 -0400)]
zebra: add dataplane API version value

Add a version value and accessor API for the zebra dataplane;
plugins can test this to detect API changes.

Signed-off-by: Mark Stapp <mjs@cisco.com>
12 months agolib: add simple generic version helpers
Mark Stapp [Fri, 5 Apr 2024 17:14:48 +0000 (13:14 -0400)]
lib: add simple generic version helpers

Add some simple helpers for generic major+minor+sub version
values.

Signed-off-by: Mark Stapp <mjs@cisco.com>
12 months agotopotests: do not check table version 15711/head
Louis Scalbert [Tue, 9 Apr 2024 07:45:06 +0000 (09:45 +0200)]
topotests: do not check table version

BGP table version is variable. Don't check it.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
12 months agoMerge pull request #15703 from louis-6wind/add-linkbw-diagram
Mark Stapp [Tue, 9 Apr 2024 12:34:11 +0000 (08:34 -0400)]
Merge pull request #15703 from louis-6wind/add-linkbw-diagram

tests: add ascii diagram to test_bgp_linkbw_ip

12 months agobgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation 15624/head
Rajasekar Raja [Thu, 15 Feb 2024 19:23:51 +0000 (11:23 -0800)]
bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation

Current changes deals with EVPN routes installation to zebra.

In evpn_route_select_install() we invoke evpn_zebra_install/uninstall
which sends zclient_send_message().

This is a continuation of code changes (similar to
ccfe452763d16c432fa81fd20e805bec819b345e) but to handle evpn part
of the code.

Ticket: #3390099

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
12 months agoMerge pull request #15645 from opensourcerouting/fix/show_ip_route_vrf_all_summary_json 14610/head
Donald Sharp [Mon, 8 Apr 2024 15:12:40 +0000 (11:12 -0400)]
Merge pull request #15645 from opensourcerouting/fix/show_ip_route_vrf_all_summary_json

zebra: Fix JSON output for `show route summary json`

12 months agotests: add ascii diagram to test_bgp_linkbw_ip 15703/head
Louis Scalbert [Tue, 26 Mar 2024 09:23:37 +0000 (10:23 +0100)]
tests: add ascii diagram to test_bgp_linkbw_ip

Add ASCII diagram to test_bgp_linkbw_ip

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
12 months agoMerge pull request #15700 from anlancs/fix/doc-bgp-gr
Donatas Abraitis [Mon, 8 Apr 2024 13:35:23 +0000 (16:35 +0300)]
Merge pull request #15700 from anlancs/fix/doc-bgp-gr

doc: fix one bgp command

12 months agodoc: fix one bgp command 15700/head
anlan_cs [Mon, 8 Apr 2024 09:24:40 +0000 (17:24 +0800)]
doc: fix one bgp command

Fixed one bgp comamnd based on code.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agozebra: fix wrong check for mpls label 15693/head
anlan_cs [Fri, 5 Apr 2024 07:03:15 +0000 (15:03 +0800)]
zebra: fix wrong check for mpls label

Add a parameter for `zebra_mpls_fec_for_label()`, as before if it is `NULL`,
otherwise exclude what this parameter represents.

Before:
```
anlan(config)# mpls label bind 1.1.1.2/32 88
anlan(config)# mpls label bind 1.1.1.2/32 88
% Label already bound to a FEC
anlan(config)# mpls label bind 1.1.1.3/32 88
% Label already bound to a FEC
```

After:
```
anlan(config)# mpls label bind 1.1.1.2/32 88
anlan(config)# mpls label bind 1.1.1.2/32 88
anlan(config)# mpls label bind 1.1.1.3/32 88
% Label already bound to a FEC
```

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agoMerge pull request #15687 from anlancs/fix/doc-isisd-append-vrf
Donald Sharp [Fri, 5 Apr 2024 23:29:04 +0000 (19:29 -0400)]
Merge pull request #15687 from anlancs/fix/doc-isisd-append-vrf

doc: correct a few commands for isis

12 months agopimd: pim mlag summary should display the down connection status. 15661/head
Rajesh Varatharaj [Tue, 2 Apr 2024 22:12:10 +0000 (15:12 -0700)]
pimd:  pim mlag summary should display the down connection status.

command 'show ip pim mlag summary json' should display 'mlagConnUp',
'mlagPeerConnUp', and 'mlagPeerZebraUp' when the connection is down.

Fix:
Added 'json_object_boolean_false_add()' for these objects.

Ticket: #

Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
12 months agoMerge pull request #15675 from pguibert6WIND/srv6_bsid_to_seg6local_2str
Donatas Abraitis [Fri, 5 Apr 2024 17:49:27 +0000 (20:49 +0300)]
Merge pull request #15675 from pguibert6WIND/srv6_bsid_to_seg6local_2str

lib: add srv6 bsid to seg6local_context2str

12 months agoMerge pull request #15640 from opensourcerouting/fix/handling_dynamic_capability_mp_gr
Donald Sharp [Fri, 5 Apr 2024 17:42:03 +0000 (13:42 -0400)]
Merge pull request #15640 from opensourcerouting/fix/handling_dynamic_capability_mp_gr

bgpd: Fix errors handling for MP/GR capabilities as dynamic capability

12 months agodoc: correct a few commands for isis 15687/head
anlan_cs [Fri, 5 Apr 2024 13:37:22 +0000 (21:37 +0800)]
doc: correct a few commands for isis

Correct a few commands for isis based on code, just complete the missing
`[vrf <NAME|all>]`.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agoMerge pull request #15682 from mjstapp/fix_topo_bfd_convergence
Donatas Abraitis [Fri, 5 Apr 2024 10:37:10 +0000 (13:37 +0300)]
Merge pull request #15682 from mjstapp/fix_topo_bfd_convergence

tests: increase topotest wait time for bfd convergence

12 months agoMerge pull request #15685 from anlancs/fix/ldpd-cmd-dup-label-check
Donatas Abraitis [Fri, 5 Apr 2024 10:36:56 +0000 (13:36 +0300)]
Merge pull request #15685 from anlancs/fix/ldpd-cmd-dup-label-check

zebra: cosmetic change for one flag

12 months agoMerge pull request #15672 from pguibert6WIND/isis_sr_mispelling
Donatas Abraitis [Fri, 5 Apr 2024 10:36:18 +0000 (13:36 +0300)]
Merge pull request #15672 from pguibert6WIND/isis_sr_mispelling

isisd: fix mispelling with ISIS_SR_LAN_BACKUP

12 months agozebra: cosmetic change for one flag 15685/head
anlan_cs [Fri, 5 Apr 2024 04:08:58 +0000 (12:08 +0800)]
zebra: cosmetic change for one flag

Use `CHECK_FLAG()` for readability.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agobgpd: fix install BGP route with appropriate colored ext. community 15592/head
Philippe Guibert [Thu, 21 Mar 2024 15:48:52 +0000 (16:48 +0100)]
bgpd: fix install BGP route with appropriate colored ext. community

When receiving a BGP update that includes a colored extended community,
the nexthop is tracked in the bgp nexthop tracking context, but the
color is never recorded. Adding to this, the BGP route is not prevented
from being installed without hte color.

Actually, the srte color is set only when the SRTE_COLOR attribute is set.
And that attribute value is only set when an ext. community is locally
created, or an srte value is set, but not when a BGP update with a color
ext. community is received.

Fix this by setting the SRTE_COLOR attribute on this last case.

Fixes: 442e2edcfaef ("bgpd: add functions related to srte_color management")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agoMerge pull request #15633 from pguibert6WIND/ipv4_ignore_routes_with_linkdown
Russ White [Thu, 4 Apr 2024 18:01:31 +0000 (14:01 -0400)]
Merge pull request #15633 from pguibert6WIND/ipv4_ignore_routes_with_linkdown

topotests: fix ignore routes with linkdown

12 months agotests: increase topotest wait time for bfd convergence 15682/head
Mark Stapp [Thu, 4 Apr 2024 16:57:07 +0000 (12:57 -0400)]
tests: increase topotest wait time for bfd convergence

Increase the wait time in a bfd topotest; failing frequently
in the CI runs.

Signed-off-by: Mark Stapp <mjs@cisco.com>
12 months agoisisd: fix mispelling with ISIS_SR_LAN_BACKUP 15672/head
Philippe Guibert [Wed, 3 Apr 2024 13:58:05 +0000 (15:58 +0200)]
isisd: fix mispelling with ISIS_SR_LAN_BACKUP

The ISIS_SR_LAN_BACKUP should be renamed to ISIS_SR_ADJ_BACKUP.

Fixes: 26f6acafc369 ("isisd: add support for segment routing")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agolib: add srv6 bsid to seg6local_context2str 15675/head
Philippe Guibert [Wed, 3 Apr 2024 19:03:26 +0000 (21:03 +0200)]
lib: add srv6 bsid to seg6local_context2str

Add SRv6 Binding SID END.B6.Encaps nh6 str to lib.
It is used to display nh6 when one uses 'show ipv6 route'.

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agoMerge pull request #15618 from opensourcerouting/fix/bgp_optimize_suppress_path
Donald Sharp [Wed, 3 Apr 2024 12:36:31 +0000 (08:36 -0400)]
Merge pull request #15618 from opensourcerouting/fix/bgp_optimize_suppress_path

bgpd: Optimize the path for suppressed announcements

12 months agotopotests: fix ignore routes with linkdown 15633/head
Philippe Guibert [Thu, 28 Mar 2024 14:56:19 +0000 (15:56 +0100)]
topotests: fix ignore routes with linkdown

In topotest, a given interface has only the ignore routes bit turned
on for IPv6 only, whereas topotest is expected to turn it on for all
address families.

> # show interface
> Interface r2-r3-eth2 is up, line protocol is up
> [..]
>  flags: <UP,BROADCAST,RUNNING,MULTICAST>
>  Ignore all v6 routes with linkdown
>  Type: Ethernet
>  [..]

This is because the only the 'default' ipv6 ignore sysctl is set to
1. Set also the /proc/sys/net/conf/<family>/default/ignore_routes_with_linkdown
flag, to have same behaviour for ipv4 and ipv6.

Fixes: 4958158787ce ("tests: micronet: update infra")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agoMerge pull request #15634 from donaldsharp/suppress_fib_funny_business
Donatas Abraitis [Wed, 3 Apr 2024 06:51:29 +0000 (09:51 +0300)]
Merge pull request #15634 from donaldsharp/suppress_fib_funny_business

Suppress fib funny business

12 months agoospfd: Implement non-broadcast support for point-to-multipoint networks 15660/head
Acee Lindem [Tue, 2 Apr 2024 15:55:49 +0000 (15:55 +0000)]
ospfd: Implement non-broadcast support for point-to-multipoint networks

This extends non-broadcast support to point-to-multipoint networks.
Neighbors will be explicitly configured and polled in lieu of multicast
dicovery. Toptotests and documentation updates are included.

Additionally, the ospf neighbor commands have been greatly simplified taking
advantage of DEFPY() capabilities.

The AllOSPFRouters (224.0.0.5) is still joined for non-broadcast networks
since it is joined for NBMA networks. It seems this could be removed but
it should done be in a separate commit.

Signed-off-by: Acee Lindem <acee@lindem.com>
12 months agoMerge pull request #15628 from opensourcerouting/fix/bgp_prefix_sid_crash
Russ White [Tue, 2 Apr 2024 15:17:52 +0000 (11:17 -0400)]
Merge pull request #15628 from opensourcerouting/fix/bgp_prefix_sid_crash

bgpd: Fix error handling when receiving BGP Prefix SID attribute

12 months agoMerge pull request #15652 from anlancs/fix/isis-doc-timer
Igor Ryzhov [Tue, 2 Apr 2024 11:25:23 +0000 (14:25 +0300)]
Merge pull request #15652 from anlancs/fix/isis-doc-timer

doc: fix one command for isis

12 months agodoc: fix one command for isis 15652/head
anlan_cs [Tue, 2 Apr 2024 06:22:14 +0000 (14:22 +0800)]
doc: fix one command for isis

Correct one command based on code.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agoMerge pull request #15636 from pguibert6WIND/resolved_prefix_bgp
Donatas Abraitis [Mon, 1 Apr 2024 21:01:34 +0000 (00:01 +0300)]
Merge pull request #15636 from pguibert6WIND/resolved_prefix_bgp

bgpd: add resolved_prefix visibility on nht

12 months agoMerge pull request #15639 from chiragshah6/fdev2
Donatas Abraitis [Mon, 1 Apr 2024 21:00:55 +0000 (00:00 +0300)]
Merge pull request #15639 from chiragshah6/fdev2

tests: add topotest for PG remote-as add del

12 months agoMerge pull request #15647 from mjstapp/fix_intf_vni_map
Igor Ryzhov [Mon, 1 Apr 2024 20:30:56 +0000 (23:30 +0300)]
Merge pull request #15647 from mjstapp/fix_intf_vni_map

zebra: don't deref vxlan-vni array

12 months agoMerge pull request #15629 from pguibert6WIND/complete_l3vpn_to_bgp
Donatas Abraitis [Mon, 1 Apr 2024 19:42:44 +0000 (22:42 +0300)]
Merge pull request #15629 from pguibert6WIND/complete_l3vpn_to_bgp

topotests: l3vpn_to_bgp_direct, complete ambiguous command 'show bgp next'

12 months agotests: add topotest for PG remote-as add del 15639/head
Chirag Shah [Sat, 30 Mar 2024 01:13:47 +0000 (18:13 -0700)]
tests: add topotest for PG remote-as add del

This topotest covers the PR-15574's coverage
where a change is not to delete neighbors when
the associated peer-group's remote-as is removed.

Ticket: #3828243
Testing:

test_bgp_peer-group.py::test_bgp_peer_group

---------------------------------------------------------------------------- live log call -----------------------------------------------------------------------------
2024-03-29 18:12:22,608 INFO: r1: checking if daemons are running
2024-03-29 18:12:22,802 INFO: r2: checking if daemons are running
2024-03-29 18:12:22,911 INFO: r3: checking if daemons are running
2024-03-29 18:12:23,015 INFO: topo: Remove bgp peer-group PG1 remote-as neighbor should be retained
2024-03-29 18:12:25,605 INFO: topo: Re-add bgp peer-group PG1 remote-as neighbor should be established

----------------------------------------------------------- generated xml file: /tmp/topotests/topotests.xml -----------------------------------------------------------
========================================================================== 2 passed in 17.63s ==========================================================================

Signed-off-by: Chirag Shah <chirag@nvidia.com>
12 months agozebra: don't deref vxlan-vni array 15647/head
Mark Stapp [Mon, 1 Apr 2024 17:00:04 +0000 (13:00 -0400)]
zebra: don't deref vxlan-vni array

Null-check the vxlan-vni array info coming into zebra from
the dataplane.

Signed-off-by: Mark Stapp <mjs@cisco.com>
12 months agozebra: Fix JSON output for `show route summary json` 15645/head
Donatas Abraitis [Sat, 30 Mar 2024 21:04:10 +0000 (23:04 +0200)]
zebra: Fix JSON output for `show route summary json`

Before:
```
{
  "routes":[
    {
      "fib":1,
      "rib":1,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"connected"
    },
    {
      "fib":1,
      "rib":1,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"local"
    },
    {
      "fib":2,
      "rib":2,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"static"
    }
  ],
  "routesTotal":4,
  "routesTotalFib":4
}
{
  "routes":[
    {
      "fib":2,
      "rib":2,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"connected"
    },
    {
      "fib":2,
      "rib":2,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"local"
    },
    {
      "fib":2,
      "rib":2,
      "fibOffLoaded":0,
      "fibTrapped":0,
      "type":"static"
    }
  ],
  "routesTotal":6,
  "routesTotalFib":6
}
```

After:
```
{
  "ISR":{
    "routes":[
      {
        "fib":1,
        "rib":1,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"connected"
      },
      {
        "fib":1,
        "rib":1,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"local"
      },
      {
        "fib":2,
        "rib":2,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"static"
      }
    ],
    "routesTotal":4,
    "routesTotalFib":4
  },
  "default":{
    "routes":[
      {
        "fib":2,
        "rib":2,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"connected"
      },
      {
        "fib":2,
        "rib":2,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"local"
      },
      {
        "fib":2,
        "rib":2,
        "fibOffLoaded":0,
        "fibTrapped":0,
        "type":"static"
      }
    ],
    "routesTotal":6,
    "routesTotalFib":6
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agoMerge pull request #15632 from piotrsuchy/psuchy/fix_json_malformed_output_ip_route_s...
Donatas Abraitis [Sat, 30 Mar 2024 20:38:12 +0000 (22:38 +0200)]
Merge pull request #15632 from piotrsuchy/psuchy/fix_json_malformed_output_ip_route_show_vrf

vtysh, zebra: fix malformed json output for multiple vrfs in command 'show ip route vrf all json'

12 months agoMerge pull request #15635 from pguibert6WIND/srv6_mem_leak
Donatas Abraitis [Sat, 30 Mar 2024 15:08:24 +0000 (17:08 +0200)]
Merge pull request #15635 from pguibert6WIND/srv6_mem_leak

bgpd: fix srv6 memory leak detection

12 months agobgpd: Fix errors handling for MP/GR capabilities as dynamic capability 15640/head
Donatas Abraitis [Sat, 30 Mar 2024 13:35:18 +0000 (15:35 +0200)]
bgpd: Fix errors handling for MP/GR capabilities as dynamic capability

When receiving a MP/GR capability as dynamic capability, but malformed, do not
forget to advance the pointer to avoid hitting infinity loop.

After:
```
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [GS0AQ-HKY0X] 127.0.0.1 rcv CAPABILITY
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 5, length 0
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 0, length 0
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [HFHDS-QT71N][EC 33554494] 127.0.0.1(donatas-pc): unrecognized capability code: 0 - ignored
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 0, code: 0, length 0
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [HFHDS-QT71N][EC 33554494] 127.0.0.1(donatas-pc): unrecognized capability code: 0 - ignored
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 0, code: 0, length 0
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [HFHDS-QT71N][EC 33554494] 127.0.0.1(donatas-pc): unrecognized capability code: 0 - ignored
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 0, code: 0, length 1
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [HFHDS-QT71N][EC 33554494] 127.0.0.1(donatas-pc): unrecognized capability code: 0 - ignored
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:15:28 donatas-laptop bgpd[353550]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
```

Before:
```
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [Z1DRQ-N6Z5F] 127.0.0.1(donatas-pc): Dynamic Capability MultiProtocol Extensions afi/safi invalid (bad-value/unicast)
Mar 29 11:14:54 donatas-laptop bgpd[347675]: [JTVED-VGTQQ] 127.0.0.1(donatas-pc): CAPABILITY has action: 1, code: 1, length 10
```

Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agobgpd: add resolved_prefix visibility on nht 15636/head
Philippe Guibert [Fri, 29 Mar 2024 11:07:14 +0000 (12:07 +0100)]
bgpd: add resolved_prefix visibility on nht

The nexthop tracking never displays the prefix that
has been used in ZEBRA to resolve its nexthop. This
information will be useful if some decision has to be
taken regarding any loops, that is to say if for instance
a BGP prefix is resolved over a prefix in ZEBRA that is
exactly the same.

Store the value in bgp nexthop context, and display it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
13 months agovtysh, zebra: Fix malformed json output for multiple vrfs in command 'show ip route... 15632/head
Piotr Suchy [Thu, 28 Mar 2024 11:55:35 +0000 (12:55 +0100)]
vtysh, zebra: Fix malformed json output for multiple vrfs in command 'show ip route vrf all json'

Command 'show ip route vrf <vrf_name> json' returns a valid json object,
however if instead of <vrf_name> we specify 'all', we get an invalid json
object, like:

{//vrf1 routes}{//vrf2 routes}{vrf3 routes}

After the fix:

{"vrf1":{//vrf1 routes},"vrf2:{//vrf2 routes},"vrf3":{//vrf3 routes}}

Which is a valid json object, that can be parsed effectively using built-in
modules. The rest of the commands remains unaffected and behave the same.

Signed-off-by: Piotr Suchy <psuchy@akamai.com>
13 months agobgpd: fix srv6 memory leak detection 15635/head
Philippe Guibert [Fri, 29 Mar 2024 07:35:34 +0000 (08:35 +0100)]
bgpd: fix srv6 memory leak detection

The asan memory leak has been detected:
> Direct leak of 16 byte(s) in 1 object(s) allocated from:
>     #0 0x7f9066dadd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
>     #1 0x7f9066779b5d in qcalloc lib/memory.c:105
>     #2 0x556d6ca527c2 in vpn_leak_zebra_vrf_sid_update_per_af bgpd/bgp_mplsvpn.c:389
>     #3 0x556d6ca530e1 in vpn_leak_zebra_vrf_sid_update bgpd/bgp_mplsvpn.c:451
>     #4 0x556d6ca64b3b in vpn_leak_postchange bgpd/bgp_mplsvpn.h:311
>     #5 0x556d6ca64b3b in vpn_leak_postchange_all bgpd/bgp_mplsvpn.c:3751
>     #6 0x556d6cb9f116 in bgp_zebra_process_srv6_locator_chunk bgpd/bgp_zebra.c:3337
>     #7 0x7f906685a6b6 in zclient_read lib/zclient.c:4490
>     #8 0x7f9066826a32 in event_call lib/event.c:2011
>     #9 0x7f906675c444 in frr_run lib/libfrr.c:1217
>     #10 0x556d6c980d52 in main bgpd/bgp_main.c:545
>     #11 0x7f9065784c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

Fix this by freeing the previous memory chunk.

Fixes: b72c9e14756f ("bgpd: cli for SRv6 SID alloc to redirect to vrf (step4)")
Fixes: 527588aa78b2 ("bgpd: add support for per-VRF SRv6 SID")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
13 months agobgpd: Prevent from one more CVE triggering this place 15628/head
Donatas Abraitis [Wed, 27 Mar 2024 17:08:38 +0000 (19:08 +0200)]
bgpd: Prevent from one more CVE triggering this place

If we receive an attribute that is handled by bgp_attr_malformed(), use
treat-as-withdraw behavior for unknown (or missing to add - if new) attributes.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agobgpd: Arrange peer notification to after zebra announce 15634/head
Donald Sharp [Thu, 28 Mar 2024 16:27:38 +0000 (12:27 -0400)]
bgpd: Arrange peer notification to after zebra announce

Currently BGP attempts to send route change information
to it's peers *before* the route is installed into zebra.
This creates a bug in suppress-fib-pending in the following
scenario:

a) bgp suppress-fib-pending and bgp has a route with
2 way ecmp.
b) bgp receives a route withdraw from peer 1.  BGP
will send the route to zebra and mark the route as
FIB_INSTALL_PENDING.
c) bgp receives a route withdraw from peer 2.  BGP
will see the route has the FIB_INSTALL_PENDING and
not send the withdrawal of the route to the peer.
bgp will then send the route deletion to zebra and
clean up the bgp_path_info's.

At this point BGP is stuck where it has not sent
a route withdrawal to downstream peers.

Let's modify the code in bgp_process_main_one to
send the route notification to zebra first before
attempting to announce the route.  The route withdrawal
will remove the FIB_INSTALL_PENDING flag from the dest
and this will allow group_announce_route to believe
it can send the route withdrawal.

For the master branch this is ok because the recent
backpressure commits are in place and nothing is going
to change from an ordering perspective in that regards.
Ostensibly this fix is also for operators of Sonic and
will be backported to the 8.5 branch as well.  This will
change the order of the send to peers to be after the
zebra installation but sonic users are using suppress-fib-pending
anyways so updates won't go out until rib ack has been
received anyways.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Note when receiving but not understanding a route notification
Donald Sharp [Thu, 28 Mar 2024 16:25:05 +0000 (12:25 -0400)]
bgpd: Note when receiving but not understanding a route notification

When BGP has been asked to wait for FIB installation, on route
removal a return call is likely to not have the dest since BGP
will have cleaned up the node, entirely.  Let's just note that
the prefix cannot be found if debugs are turned on and move on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Fix error handling when receiving BGP Prefix SID attribute
Donatas Abraitis [Wed, 27 Mar 2024 16:42:56 +0000 (18:42 +0200)]
bgpd: Fix error handling when receiving BGP Prefix SID attribute

Without this patch, we always set the BGP Prefix SID attribute flag without
checking if it's malformed or not. RFC8669 says that this attribute MUST be discarded.

Also, this fixes the bgpd crash when a malformed Prefix SID attribute is received,
with malformed transitive flags and/or TLVs.

Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agotopotests: l3vpn_to_bgp_direct, complete ambiguous command 'show bgp next' 15629/head
Philippe Guibert [Thu, 7 Mar 2024 16:12:07 +0000 (17:12 +0100)]
topotests: l3vpn_to_bgp_direct, complete ambiguous command 'show bgp next'

Complete the 'show bgp next' command expected when the l3vpn_to_bgp_direct
is executed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
13 months agoMerge pull request #15557 from idryzhov/remove-confd
Jafar Al-Gharaibeh [Wed, 27 Mar 2024 17:38:31 +0000 (12:38 -0500)]
Merge pull request #15557 from idryzhov/remove-confd

*: remove confd plugin

13 months agoMerge pull request #15623 from Jafaral/uprev-10.0
Donatas Abraitis [Wed, 27 Mar 2024 13:12:25 +0000 (15:12 +0200)]
Merge pull request #15623 from Jafaral/uprev-10.0

debian, redhat: updating changelog for 10.0 release

13 months agodebian, redhat: updating changelog for 10.0 release 15623/head
Jafar Al-Gharaibeh [Tue, 26 Mar 2024 00:30:02 +0000 (19:30 -0500)]
debian, redhat: updating changelog for 10.0 release

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
13 months agoMerge pull request #15598 from louis-6wind/fix-nhg-iface
Mark Stapp [Tue, 26 Mar 2024 15:49:03 +0000 (11:49 -0400)]
Merge pull request #15598 from louis-6wind/fix-nhg-iface

zebra: fix rejected route due to wrong nexthop-group

13 months agoMerge pull request #15585 from opensourcerouting/feature/enable_dynamic_capability_fo...
Russ White [Tue, 26 Mar 2024 14:09:50 +0000 (10:09 -0400)]
Merge pull request #15585 from opensourcerouting/feature/enable_dynamic_capability_for_datacenter_profile

bgpd: Enable BGP dynamic capability by default for datacenter profile

13 months agoMerge pull request #15525 from venko-networks/ccs/bugfix/show-ip-bgp
Russ White [Tue, 26 Mar 2024 14:04:43 +0000 (10:04 -0400)]
Merge pull request #15525 from venko-networks/ccs/bugfix/show-ip-bgp

bgpd: add missing white-space between route short status and network …

13 months agoMerge pull request #15524 from raja-rajasekar/rajasekarr/backpressure_bgp_zebra_client
Russ White [Tue, 26 Mar 2024 14:03:35 +0000 (10:03 -0400)]
Merge pull request #15524 from raja-rajasekar/rajasekarr/backpressure_bgp_zebra_client

backpressure bgp zebra client

13 months agobgpd: Optimize the path for suppressed announcements 15618/head
Donatas Abraitis [Tue, 26 Mar 2024 11:19:17 +0000 (13:19 +0200)]
bgpd: Optimize the path for suppressed announcements

If supress-duplicates is turned of (which is turned on by default), do not
calculate attribute hash key, that consumes CPU quite a lot.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agozebra: changes for code maintainability 15612/head
sri-mohan1 [Mon, 25 Mar 2024 03:54:52 +0000 (09:24 +0530)]
zebra: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
13 months agobgpd : backpressure - Handle BGP-Zebra Install evt Creation 15524/head
Donald Sharp [Fri, 26 Jan 2024 19:48:53 +0000 (14:48 -0500)]
bgpd : backpressure - Handle BGP-Zebra Install evt Creation

BGP is now keeping a list of dests with the dest having a pointer
to the bgp_path_info that it will be working on.

1) When bgp receives a prefix, process it, add the bgp_dest of the
prefix into the new Fifo list if not present, update the flags (Ex:
earlier if the prefix was advertised and now it is a withdrawn),
increment the ref_count and DO NOT advertise the install/withdraw
to zebra yet.

2) Schedule an event to wake up to invoke the new function which will
walk the list one by one and installs/withdraws the routes into zebra.
  a) if BUFFER_EMPTY, process the next item on the list
  b) if BUFFER_PENDING, bail out and the callback in
  zclient_flush_data() will invoke the same function when BUFFER_EMPTY

Changes
 - rename old bgp_zebra_announce to bgp_zebra_announce_actual
 - rename old bgp_zebra_withdrw to bgp_zebra_withdraw_actual
 - Handle new fifo list cleanup in bgp_exit()
 - New funcs: bgp_handle_route_announcements_to_zebra() and
   bgp_zebra_route_install()
 - Define a callback function to invoke
   bgp_handle_route_announcements_to_zebra() when BUFFER_EMPTY in
   zclient_flush_data()

The current change deals with bgp installing routes via
bgp_process_main_one()

Ticket: #3390099

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
13 months agobgpd: backpressure - cleanup bgp_zebra_XX func args
Donald Sharp [Thu, 25 Jan 2024 18:07:37 +0000 (13:07 -0500)]
bgpd: backpressure - cleanup bgp_zebra_XX func args

Since installing/withdrawing routes into zebra is going to be changed
around to be dest based in a list,
 - Retrieve the afi/safi to use based upon the dest's afi/safi
   instead of passing it in.
 - Prefix is known by the dest. Remove this arg as well

Ticket: #3390099

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
13 months agobgpd: backpressure - Add a typesafe list for Zebra Announcement
Donald Sharp [Thu, 25 Jan 2024 17:53:24 +0000 (12:53 -0500)]
bgpd: backpressure - Add a typesafe list for Zebra Announcement

Modify the bgp master to hold a type safe list for bgp_dests that need
to be passed to zebra.

Future commits will use this.

Ticket: #3390099

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
13 months agoMerge pull request #15603 from idryzhov/mgmt-txn-cleanup
Donatas Abraitis [Mon, 25 Mar 2024 20:14:59 +0000 (22:14 +0200)]
Merge pull request #15603 from idryzhov/mgmt-txn-cleanup

mgmtd: remove unused event type

13 months agoMerge pull request #15609 from anlancs/fix/doc-isis-hello
Donatas Abraitis [Mon, 25 Mar 2024 11:30:03 +0000 (13:30 +0200)]
Merge pull request #15609 from anlancs/fix/doc-isis-hello

doc: fix some commands for isis

13 months agodoc: fix some commands for isis 15609/head
anlan_cs [Thu, 21 Mar 2024 12:07:00 +0000 (20:07 +0800)]
doc: fix some commands for isis

Signed-off-by: anlan_cs <vic.lan@pica8.com>
13 months agoMerge pull request #15602 from idryzhov/mgmt-fix-logs
Mark Stapp [Fri, 22 Mar 2024 20:56:58 +0000 (16:56 -0400)]
Merge pull request #15602 from idryzhov/mgmt-fix-logs

mgmtd: fix a couple of log messages

13 months agomgmtd: remove unused event type 15603/head
Igor Ryzhov [Fri, 22 Mar 2024 14:43:18 +0000 (16:43 +0200)]
mgmtd: remove unused event type

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agomgmtd: fix a couple of log messages 15602/head
Igor Ryzhov [Fri, 22 Mar 2024 14:35:52 +0000 (16:35 +0200)]
mgmtd: fix a couple of log messages

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agoMerge pull request #15593 from LabNConsulting/acee/ospf-link-flap-ase-route-change
Mark Stapp [Fri, 22 Mar 2024 12:35:42 +0000 (08:35 -0400)]
Merge pull request #15593 from LabNConsulting/acee/ospf-link-flap-ase-route-change

ospfd: Assure OSPF AS External routes are installed after link flap

13 months agoMerge pull request #15590 from sri-mohan1/srib-24-zebra-b
Mark Stapp [Fri, 22 Mar 2024 12:33:52 +0000 (08:33 -0400)]
Merge pull request #15590 from sri-mohan1/srib-24-zebra-b

zebra: changes for code maintainability

13 months agoMerge pull request #15010 from tlsalmin/master
Mark Stapp [Fri, 22 Mar 2024 12:31:12 +0000 (08:31 -0400)]
Merge pull request #15010 from tlsalmin/master

zebra: Fix crash on macvlan link down/up