Commit Graph

35236 Commits

Author SHA1 Message Date
Donatas Abraitis
36405f97e2 bgpd: Flow Spec redirect IPv6 Extended Community should be 0x0d
RFC 8956 defines this already clearly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-15 09:27:07 +03:00
Igor Ryzhov
d315382d47 bfdd: fix BFD_GETCBIT
The macro should check C bit, not F bit.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-04-15 01:57:16 +03:00
Donatas Abraitis
cc04847730
Merge pull request #15592 from pguibert6WIND/fix_srte_color
bgpd: fix register NHT with appropriate colored ext. community
2024-04-14 21:09:47 +03:00
Donatas Abraitis
deef11a22b
Merge pull request #15612 from sri-mohan1/srib-24-zebra-b
zebra: changes for code maintainability
2024-04-14 21:06:28 +03:00
Donatas Abraitis
33331ab302
Merge pull request #15731 from anlancs/bgpd-add-gr-fsm
bgpd: adjust checking return value for commands
2024-04-13 23:19:49 +03:00
Donatas Abraitis
6b90e6140f tests: Check if maximum-prefix works for EVPN stuff also
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13 23:10:27 +03:00
Donatas Abraitis
0c54dfde69 bgpd: Allow using maximum-prefix for EVPN
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13 23:10:21 +03:00
Donatas Abraitis
f003ccf16b ospfd: Fix compile warning with -Wformat-truncation
ospfd/ospf_sr.c: In function ‘show_sr_node.part.5’:
ospfd/ospf_sr.c:2745:32: warning: ‘%u’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
    snprintf(tmp, sizeof(tmp), "%u", i);
                                ^~
ospfd/ospf_sr.c:2745:31: note: directive argument in the range [0, 2147483646]
    snprintf(tmp, sizeof(tmp), "%u", i);

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13 22:41:43 +03:00
Donatas Abraitis
50e85abc25 isisd: Fix compile warning with -Wformat-truncation
isisd/isis_spf.c: In function ‘show_isis_route_common’:
isisd/isis_spf.c:3034:39: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
     snprintf(key, sizeof(key), "level-%d", level);
                                       ^~
isisd/isis_spf.c:3034:32: note: directive argument in the range [1, 2147483646]
     snprintf(key, sizeof(key), "level-%d", level);
                                ^~~~~~~~~~

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13 22:40:46 +03:00
Donatas Abraitis
88c55b8e6f
Merge pull request #15727 from donaldsharp/evpn_zebra_interactions
Evpn zebra interactions
2024-04-13 22:19:10 +03:00
Donatas Abraitis
1dc28e1d73 bgpd: Drop newline in JSON output for show bgp afi safi json detail
Before:

```
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 2,
 "routerId": "1.1.1.1",
 "defaultLocPrf": 100,
 "localAS": 65001,
 "routes": { "192.168.1.0/24": {
"prefix": "192.168.1.0/24",
"version": "1",

"paths": [{"aspath":{"string":"Local","segments":[],"length":0},"origin":"IGP","metric":0,"weight":32768,"valid":true,"version":1,"sourced":true,"local":true,"bestpath":{"overall":true,"selectionReason":"First path received"},"lastUpdate":{"epoch":1713035588,"string":"Sat Apr 13 22:13:08 2024\n"},"nexthops":[{"ip":"0.0.0.0","hostname":"donatas.net","afi":"ipv4","metric":0,"accessible":true,"used":true}],"peer":{"peerId":"0.0.0.0","routerId":"1.1.1.1"}}]
} ,"192.168.11.0/24": {
"prefix": "192.168.11.0/24",
"version": "2",

"paths": [{"aspath":{"string":"Local","segments":[],"length":0},"origin":"IGP","metric":0,"weight":32768,"valid":true,"version":2,"sourced":true,"local":true,"bestpath":{"overall":true,"selectionReason":"First path received"},"lastUpdate":{"epoch":1713035588,"string":"Sat Apr 13 22:13:08 2024\n"},"nexthops":[{"ip":"0.0.0.0","hostname":"donatas.net","afi":"ipv4","metric":0,"accessible":true,"used":true}],"peer":{"peerId":"0.0.0.0","routerId":"1.1.1.1"}}]
}  }  }
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13 22:17:01 +03:00
Donatas Abraitis
a4737997ad bgpd: Drop bgp_network_import_check_exact_cmd command
Not documented, and it's just an alias.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13 22:10:14 +03:00
anlan_cs
70c4dea8a9 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>
2024-04-13 09:35:37 +08:00
anlan_cs
1a8725b11f 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>
2024-04-13 09:28:55 +08:00
Rajasekar Raja
ed7005d0ed zebra: backpressure - Fix Null ptr access (Coverity Issue)
Fix dereferencing NULL ptr making coverity happy.

Ticket :#3390099

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-04-12 09:48:00 -07:00
Igor Ryzhov
b6e6656a2e
Merge pull request #15697 from zmw12306/bfd_check_Mflag
bfdd: Add check for flag Multipoint (M)
2024-04-12 16:09:43 +03:00
Donald Sharp
c8e0ece39d bgpd: Convert int's to bool in a couple of spots
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-12 07:35:38 -04:00
Donald Sharp
9edf45b889 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>
2024-04-12 07:35:38 -04:00
Jafar Al-Gharaibeh
692f916b88
Merge pull request #15688 from mjstapp/dplane_api_version
lib, zebra: Add a version scheme for the dataplane API
2024-04-11 23:54:02 -05:00
zmw12306
665ec41339 bfdd: add check for flag M
Signed-off-by: zmw12306 <zmw12306@gmail.com>
2024-04-11 20:30:56 -04:00
Donald Sharp
5139ce8a3b
Merge pull request #15710 from acooks-at-bda/bugfix/fix-indent-byte-handling
tools/indent.py: fix encoded byte stream handling
2024-04-11 08:25:15 -04:00
Donatas Abraitis
0176f62b30
Merge pull request #15661 from routingrocks/master
pimd:  pim mlag summary should display the down connection status.
2024-04-11 13:44:00 +03:00
Donatas Abraitis
1596d99352
Merge pull request #15719 from pguibert6WIND/show_bgp_neighbors_extra_line
bgpd: fix 'show bgp neighbors' output
2024-04-11 13:40:06 +03:00
Donatas Abraitis
8f7bc620b5 ospfd, ospf6d: Remove deprecated JSON fields
restartSupoort

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-11 13:34:17 +03:00
Chirag Shah
c1356f0e85 tools: frr-reload strip interface vrf ctx line
if frr.conf file contains 'interface x vrf <name> config
it causes protocol (like ospf) neighbor session flap,
as it deletes interface base config line ('interface x') from
running config and readds with 'interface x vrf <name>'
line from frr.conf.
This deletion and readdition of lines leads to neighborship
flaps.

This issue is by product of (PR-10411 | https://github.com/FRRouting/frr/pull/10411)
(commit id: 788a036fdb)
where running config for interface config no loger displays associated
vrf line.

Ticket: #3858146
Testing:

frr.conf
interface swp1.2 vrf vrf1012
ip ospf network point-to-point

running-config:
interface swp1.2
 ip ospf network point-to-point
 exit

Before fix:
frr-reload logs:

2024-04-09 00:28:31,096  INFO: Executed "interface swp1.2  no ip ospf
network point-to-point exit"

 'interface swp1.2 vrf vrf1012\n ip ospf network
 point-to-point\nexit\n',

After fix:
frr-reload strips vrf line, thus no config change between
frr.conf and running config.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-04-10 16:24:03 -07:00
Donatas Abraitis
3d3f9684ae
Merge pull request #15582 from donaldsharp/zebra_rtadv_use_without_init
Zebra rtadv use without init
2024-04-10 20:58:35 +03:00
Donald Sharp
ea570f2aa6 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>
2024-04-10 09:28:17 -04:00
Donald Sharp
4fb336424e zebra: rtadv uses uninited data to sendmsg
valgrind is complaining about this problem.
This fixes it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-10 09:24:13 -04:00
Philippe Guibert
34738e3552 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: 0e4e879b40 ("bgpd: fix silly format string SNAFU")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-04-10 14:15:06 +02:00
mobash-rasool
5ff94749d3
Merge pull request #13627 from anlancs/pimd/pimreg-vrf-add-break
pimd: Set pimreg interface with one master
2024-04-10 16:50:07 +05:30
Andrew Cooks
e443644fdd 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>
2024-04-10 16:05:03 +10:00
Donatas Abraitis
73a6aa6a14
Merge pull request #15708 from donaldsharp/zebra_fix_io_display
Zebra fix io display and shorten evpn zapi packet sizes
2024-04-10 08:26:02 +03:00
Donatas Abraitis
0a0ec0e165
Merge pull request #15624 from raja-rajasekar/rajasekarr/backpressure_bgp_zebra_client_EVPN
bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation
2024-04-10 08:22:25 +03:00
Donald Sharp
86aac4e36d
Merge pull request #15711 from louis-6wind/fix_test_table_version
topotests: do not check table version
2024-04-09 18:34:13 -04:00
Donald Sharp
5d7b50d1c0
Merge pull request #15693 from anlancs/fix/zebra-label-bind
zebra: fix wrong check for mpls label
2024-04-09 18:33:29 -04:00
Russ White
7f6cda36b1
Merge pull request #15660 from LabNConsulting/acee/ospf-p2mp-non-broadcast
ospfd: Implement non-broadcast support for point-to-multipoint networks
2024-04-09 11:56:34 -04:00
Donald Sharp
94516d25aa 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>
2024-04-09 10:08:03 -04:00
Donald Sharp
8d8f12ba8e 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>
2024-04-09 10:08:03 -04:00
zhou-run
f9b1067bf1
isisd: The hold time of hello packets on a P2P link does not match the sending interval.
The hold time filled in the hello packets of a P2P link is calculated based on the level 1 configuration, while the hello timer is based on the level 2 configuration. If the hello interval times in level 1 and level 2 configurations are inconsistent, it may lead to neighbor establishment failure.


Signed-off-by: zhou-run <166502045+zhou-run@users.noreply.github.com>
2024-04-09 20:59:22 +08:00
Mark Stapp
f8cab99727 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>
2024-04-09 08:59:13 -04:00
Mark Stapp
9f285dd0bc 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>
2024-04-09 08:59:13 -04:00
Mark Stapp
f090079390 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>
2024-04-09 08:59:13 -04:00
Louis Scalbert
29f47f3deb topotests: do not check table version
BGP table version is variable. Don't check it.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-09 14:51:35 +02:00
Mark Stapp
48805d617b
Merge pull request #15703 from louis-6wind/add-linkbw-diagram
tests: add ascii diagram to test_bgp_linkbw_ip
2024-04-09 08:34:11 -04:00
Rajasekar Raja
a07df6f754 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
ccfe452763) but to handle evpn part
of the code.

Ticket: #3390099

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-04-08 10:51:43 -07:00
Donald Sharp
8cfa3b57e9
Merge pull request #15645 from opensourcerouting/fix/show_ip_route_vrf_all_summary_json
zebra: Fix JSON output for `show route summary json`
2024-04-08 11:12:40 -04:00
Louis Scalbert
a6ea590c6b 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>
2024-04-08 16:19:55 +02:00
Dmytro Shytyi
8e82e2d5ed zebra: fix static srv6 segment-list sid order
When configuring a SID list by vtysh, the segment list
obtained in iproute2 is the exact opposite:
>
>vtysh:
>ipv6 route 2005::/64 eth0 segments 2001:db8:aaaa::7/2002::2/2003::3/2004::4
>
>root@r1:/# ip -6 route
>2005::/64 nhid 6  encap seg6 mode encap segs 4 [ 2004::4 2003::3 2002::2 2001:db8:aaaa::7 ] dev dummy0 proto 196 metric 20 pref medium
>

Fix this by keeping the same vtysh config and swap the
segment's order of the list in the rt_netlink.c
>
>root@r1:/# ip -6 route
>2005::/64 nhid 6  encap seg6 mode encap segs 4 [ 2001:db8:aaaa::7 2002::2 2003::3 2004::4 ] dev dummy0 proto 196 metric 20 pref medium
>

Fixes: f20cf14 ("bgpd,lib,sharpd,zebra: srv6 introduce multiple segs/SIDs in nexthop")

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
2024-04-08 15:45:26 +02:00
Donatas Abraitis
a2df7e2a16
Merge pull request #15700 from anlancs/fix/doc-bgp-gr
doc: fix one bgp command
2024-04-08 16:35:23 +03:00
anlan_cs
b8ac0fb23c doc: fix one bgp command
Fixed one bgp comamnd based on code.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-04-08 17:25:14 +08:00