summaryrefslogtreecommitdiffstats
path: root/bfdd/bfdd_nb_state.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-04-16vtysh: Check if bgpd is enabled before installing vtysh commands for RPKIDonatas Abraitis1-0/+2
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-15zebra: fix encoded DNSSL lengthIgor Ryzhov1-0/+1
The encoded DNSSL length is not set so the value is missing from RA packet. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-04-15bgpd: Fix display when using `missing-as-worst`Donald Sharp5-38/+65
The usage of the `bgp bestpath med missing-as-worst` command was being accepted and applied during bestpath, but during output of the routes affected by this it would not give any indication that this was happening or what med value was being used. Fixes: #15718 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-15bgpd: fix compile erroranlan_cs1-0/+2
This is happening when configuring with `--disable-bgp-vnc`: ``` ./bgpd/bgp_route.c:3342:23: error: unused variable ‘p’ [-Werror=unused-variable] 3342 | const struct prefix *p = bgp_dest_get_prefix(dest); ``` Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-04-15bgpd: fix addressing information of non established outgoing sessionsPhilippe Guibert1-0/+18
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>
2024-04-15bgpd: remove useless control checks about TCP connectionPhilippe Guibert1-4/+0
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>
2024-04-15bgpd: Flow Spec redirect IPv6 Extended Community should be 0x0dDonatas Abraitis1-4/+2
RFC 8956 defines this already clearly. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13tests: Check if maximum-prefix works for EVPN stuff alsoDonatas Abraitis6-0/+155
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13bgpd: Allow using `maximum-prefix` for EVPNDonatas Abraitis1-0/+9
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13ospfd: Fix compile warning with `-Wformat-truncation`Donatas Abraitis1-2/+2
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-13isisd: Fix compile warning with `-Wformat-truncation`Donatas Abraitis1-1/+1
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-13bgpd: Drop newline in JSON output for `show bgp afi safi json detail`Donatas Abraitis1-1/+1
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-13bgpd: Drop `bgp_network_import_check_exact_cmd` commandDonatas Abraitis1-0/+3
Not documented, and it's just an alias. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-13bgpd: prompt should be given only for the real changeanlan_cs1-62/+76
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-13bpgd: adjust return value for the same commandanlan_cs1-4/+4
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-12zebra: backpressure - Fix Null ptr access (Coverity Issue)Rajasekar Raja1-1/+1
Fix dereferencing NULL ptr making coverity happy. Ticket :#3390099 Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2024-04-12bgpd: Convert int's to bool in a couple of spotsDonald Sharp1-6/+6
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-12bgpd: Increase install/uninstall speed of evpn vpn vni'sDonald Sharp1-47/+21
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-12bfdd: add check for flag Mzmw123062-0/+8
Signed-off-by: zmw12306 <zmw12306@gmail.com>
2024-04-11ospfd, ospf6d: Remove deprecated JSON fieldsDonatas Abraitis2-18/+0
restartSupoort Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-04-11tools: frr-reload strip interface vrf ctx lineChirag Shah1-0/+21
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-10tests: Cleanup generate_support_bundle() to not failDonald Sharp1-2/+14
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-10zebra: rtadv uses uninited data to sendmsgDonald Sharp1-5/+5
valgrind is complaining about this problem. This fixes it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-10bgpd: fix 'show bgp neighbors' outputPhilippe Guibert1-2/+2
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>
2024-04-10tools/indent.py: fix encoded byte stream handlingAndrew Cooks1-2/+2
Python subprocess communication now operates on bytes, not strings. Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
2024-04-09zebra: Use more appropriately sized stream packets for evpnDonald Sharp3-7/+7
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-09zebra: Actually display I/O buffer sizesDonald Sharp2-5/+1
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-09isisd: The hold time of hello packets on a P2P link does not match the ↵zhou-run1-1/+1
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-09doc: add doc about the zebra dataplane api versionMark Stapp1-0/+15
Add a block to the dev doc about the dataplane api version. Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-04-09zebra: add dataplane API version valueMark Stapp2-0/+20
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-09lib: add simple generic version helpersMark Stapp2-0/+20
Add some simple helpers for generic major+minor+sub version values. Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-04-09topotests: do not check table versionLouis Scalbert7-7/+0
BGP table version is variable. Don't check it. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-08bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt CreationRajasekar Raja9-142/+300
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>
2024-04-08tests: add ascii diagram to test_bgp_linkbw_ipLouis Scalbert1-1/+33
Add ASCII diagram to test_bgp_linkbw_ip Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-04-08zebra: fix static srv6 segment-list sid orderDmytro Shytyi1-1/+1
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-08doc: fix one bgp commandanlan_cs1-1/+1
Fixed one bgp comamnd based on code. Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-04-06zebra: fix wrong check for mpls labelanlan_cs3-7/+12
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>
2024-04-05pimd: pim mlag summary should display the down connection status.Rajesh Varatharaj1-6/+9
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>
2024-04-05doc: correct a few commands for isisanlan_cs1-4/+4
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>
2024-04-05zebra: cosmetic change for one flaganlan_cs1-3/+3
Use `CHECK_FLAG()` for readability. Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-04-04bgpd: fix install BGP route with appropriate colored ext. communityPhilippe Guibert1-2/+4
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>
2024-04-04tests: increase topotest wait time for bfd convergenceMark Stapp1-1/+1
Increase the wait time in a bfd topotest; failing frequently in the CI runs. Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-04-04isisd: fix mispelling with ISIS_SR_LAN_BACKUPPhilippe Guibert5-11/+9
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>
2024-04-03lib: add srv6 bsid to seg6local_context2strPhilippe Guibert1-1/+3
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>
2024-04-03topotests: fix ignore routes with linkdownPhilippe Guibert1-0/+2
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>
2024-04-02ospfd: Implement non-broadcast support for point-to-multipoint networksAcee Lindem23-200/+1188
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>
2024-04-02doc: fix one command for isisanlan_cs1-1/+1
Correct one command based on code. Signed-off-by: anlan_cs <anlan_cs@tom.com>
2024-04-01bgpd: Sort the bgp_path_info'sDonald Sharp4-69/+335
Currently bgp_path_info's are stored in reverse order received. Sort them by the best path ordering. This will allow for optimizations in the future on how multipath is done. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-04-01tests: add topotest for PG remote-as add delChirag Shah5-1/+62
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>
2024-04-01zebra: don't deref vxlan-vni arrayMark Stapp1-0/+3
Null-check the vxlan-vni array info coming into zebra from the dataplane. Signed-off-by: Mark Stapp <mjs@cisco.com>