summaryrefslogtreecommitdiffstats
path: root/bgpd/bgpd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bgpd: do not del peer upon pg remote as changeChirag Shah2024-03-181-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when peer-group remote-as is removed, it deletes all associated neighbors. Upon re configuring peer-group remote-as, all neighbors needs to be reconfigured. Instead, when peer-group remote-as is remove, cease associated peer's connection and keep in Idle state. When the peer-group remote-as is (re)configured, trigger BGP Peer FSM to form neighbor. Note the connection will be initiated after start timer expiry. Ticket: #3828243 Testing: ----- Peers start config ---- router bgp 65566 bgp router-id 27.0.0.5 bgp bestpath as-path multipath-relax neighbor fabric peer-group neighbor fabric remote-as external >>>> neighbor swp1 interface peer-group fabric neighbor swp1 advertisement-interval 0 neighbor swp1 timers 3 9 neighbor swp1 timers connect 10 neighbor swp2 interface peer-group fabric neighbor swp2 advertisement-interval 0 neighbor swp2 timers 3 9 tor(config)# router bgp 65566 tor(config-router)# no neighbor fabric remote-as external ----- Peers are retained in config ---- router bgp 65566 bgp router-id 27.0.0.5 bgp bestpath as-path multipath-relax neighbor fabric peer-group neighbor swp1 interface peer-group fabric neighbor swp1 advertisement-interval 0 neighbor swp1 timers 3 9 neighbor swp1 timers connect 10 neighbor swp2 interface peer-group fabric neighbor swp2 advertisement-interval 0 neighbor swp2 timers 3 9 ----- Peers are in idle state ---- Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc spine-1(swp1) 4 0 52 34 0 0 0 00:00:04 Idle 0 N/A spine-3(swp2) 4 0 52 34 0 0 0 00:00:04 Idle 0 N/A tor(config)# router bgp 65566 tor(config-router)# neighbor fabric remote-as external ---- after connect timer expiry forms the neighbor ---- Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc spine-1(swp1) 4 64435 784 749 0 0 0 00:35:10 11 2 N/A spine-3(swp2) 4 64435 784 749 0 0 0 00:35:10 11 2 N/A Signed-off-by: Chirag Shah <chirag@nvidia.com>
* bgpd: make as-path-loop-detection conform to the frameworkFrancois Dumontet2024-03-141-0/+1
| | | | | | | | | | | | | | | currently: when as-path-loop-detection is set on a peer-group. members of the peer-group are not using that functionnality. analysis: the as-path-loop-detection, is not using the peer's flags related framework. fix: use the peer's flag framework for as-path-loop-detection. Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
* bgpd: Fix `no` form for `neighbor X capability software-version`Donatas Abraitis2024-03-091-0/+3
| | | | | | | If `bgp default software-version-capability` is enabled, allow unsetting this for a single neighbor also. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* bgpd: Implement Paths-Limit capabilityDonatas Abraitis2024-02-131-0/+5
| | | | | | https://datatracker.ietf.org/doc/html/draft-abraitis-idr-addpath-paths-limit Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* Merge pull request #15284 from ↵Russ White2024-02-131-0/+5
|\ | | | | | | | | opensourcerouting/feature/bgpd_announce_rpki_state_knob bgpd: Add neighbor X send-community extended rpki command
| * bgpd: Add `neighbor X send-community extended rpki` commandDonatas Abraitis2024-02-071-0/+5
| | | | | | | | | | | | | | | | By default, iBGP and eBGP-OAD peers exchange RPKI extended community by default. Add a command to disable sending RPKI extended community if needed. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | bgpd: fix minttl copying during peer resetAlexander Skorichenko2024-02-091-0/+1
|/ | | | | | | Include gtsm_hops (minttl) field when copying peer structure, so that a new connection could set a proper value. Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
* bgpd: Do not reset the session if turning on/off FQDN capabilityDonatas Abraitis2024-02-051-1/+1
| | | | | | Allow BGP dynamic capabilities handle this gracefully. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* bgpd: add [no]neighbor capability fqdn commandFrancois Dumontet2024-02-021-0/+4
| | | | | | | | | | | | | | | | | cisco routers are not dealing fairly whith unsupported capabilities. When a cisco router receive an unsupported capabilities it reset the negociation without notifying the unmatching capability as described in RFC2842. Cisco suggest the use of neighbor x.x.x.x capability fqdn to avoid the use of fqdn in open message. this new command is to remove the use of fqdn capability in the open message with the peer "x.x.x.x". Link: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/116189-problemsolution-technology-00.pdf Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
* bgpd: Make `suppress-fib-pending` clear peeringDonald Sharp2023-12-121-0/+38
| | | | | | | | | | | | When a peer has come up and already started installing routes into the rib and `suppress-fib-pending` is either turned on or off. BGP is left with some routes that may need to be withdrawn from peers and routes that it does not know the status of. Clear the BGP peers for the interesting parties and let's let us come up to speed as needed. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* Merge pull request #14992 from opensourcerouting/fix/oad_missing_partsRuss White2023-12-121-0/+1
|\ | | | | bgpd: Recent OAD fixes
| * bgpd: Update sub_sort when handling doppelganger connectionsDonatas Abraitis2023-12-121-0/+1
| | | | | | | | | | | | | | This is important especially for OPEN messages. Without this, we can't send software-version capability which relies on OAD too. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | Merge pull request #14984 from pguibert6WIND/bgp_l3nhg_to_bgp_nhgRuss White2023-12-121-1/+2
|\ \ | | | | | | bgpd: move l3nhg functions in separate bgp_nhg.[ch] file
| * | bgpd: move l3nhg functions in separate bgp_nhg.[ch] filePhilippe Guibert2023-12-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This rework separates l3nhg functionality from the nexthop tracking code, by introducing two bgp_nhg.[ch] files. The calling functions are renamed from bgp_l3nhg* to bgp_nhg*. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* | | Merge pull request #14966 from ↵Russ White2023-12-121-4/+4
|\ \ \ | |_|/ |/| | | | | | | | opensourcerouting/fix/bgpd_route-map_default_originate_peer-group tests: Check if default-originate works combined with peer-groups + route-maps
| * | bgpd: Convert variable `withdraw` integer to boolDonatas Abraitis2023-12-081-4/+4
| |/ | | | | | | | | | | It holds only 0/1. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* / bgpd: Respect enforce-first-as command for peer-groups according to the defaultsDonatas Abraitis2023-12-081-3/+3
|/ | | | | | | This was missed for peer-groups. Moved this default handling from peer_create() to peer_new() which is also used by peer_group_get(). Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* Merge pull request #14907 from Keelan10/bgp_srv6-leakDonatas Abraitis2023-11-301-0/+2
|\ | | | | bgpd: Free Memory for SRv6 Functions and Locator Chunks
| * bgpd: Free Memory for SRv6 Functions and Locator ChunksKeelan102023-11-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement proper memory cleanup for SRv6 functions and locator chunks to prevent potential memory leaks. The list callback deletion functions have been set. The ASan leak log for reference: ``` *********************************************************************************** Address Sanitizer Error detected in bgp_srv6l3vpn_to_bgp_vrf.test_bgp_srv6l3vpn_to_bgp_vrf/r2.asan.bgpd.4180 ================================================================= ==4180==ERROR: LeakSanitizer: detected memory leaks Direct leak of 544 byte(s) in 2 object(s) allocated from: #0 0x7f8d176a0d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) #1 0x7f8d1709f238 in qcalloc lib/memory.c:105 #2 0x55d5dba6ee75 in sid_register bgpd/bgp_mplsvpn.c:591 #3 0x55d5dba6ee75 in alloc_new_sid bgpd/bgp_mplsvpn.c:712 #4 0x55d5dba6f3ce in ensure_vrf_tovpn_sid_per_af bgpd/bgp_mplsvpn.c:758 #5 0x55d5dba6fb94 in ensure_vrf_tovpn_sid bgpd/bgp_mplsvpn.c:849 #6 0x55d5dba7f975 in vpn_leak_postchange bgpd/bgp_mplsvpn.h:299 #7 0x55d5dba7f975 in vpn_leak_postchange_all bgpd/bgp_mplsvpn.c:3704 #8 0x55d5dbbb6c66 in bgp_zebra_process_srv6_locator_chunk bgpd/bgp_zebra.c:3164 #9 0x7f8d1716f08a in zclient_read lib/zclient.c:4459 #10 0x7f8d1713f034 in event_call lib/event.c:1974 #11 0x7f8d1708242b in frr_run lib/libfrr.c:1214 #12 0x55d5db99d19d in main bgpd/bgp_main.c:510 #13 0x7f8d160c5c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Direct leak of 296 byte(s) in 1 object(s) allocated from: #0 0x7f8d176a0d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28) #1 0x7f8d1709f238 in qcalloc lib/memory.c:105 #2 0x7f8d170b1d5f in srv6_locator_chunk_alloc lib/srv6.c:135 #3 0x55d5dbbb6a19 in bgp_zebra_process_srv6_locator_chunk bgpd/bgp_zebra.c:3144 #4 0x7f8d1716f08a in zclient_read lib/zclient.c:4459 #5 0x7f8d1713f034 in event_call lib/event.c:1974 #6 0x7f8d1708242b in frr_run lib/libfrr.c:1214 #7 0x55d5db99d19d in main bgpd/bgp_main.c:510 #8 0x7f8d160c5c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) *********************************************************************************** ``` Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
* | bgpd: Free Memory for confed_peers in bgp_freeKeelan102023-11-291-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Release memory associated with `bgp->confed_peers` in the `bgp_free` function to ensure proper cleanup. This fix prevents memory leaks related to `confed_peers`. The ASan leak log for reference: ``` *********************************************************************************** Address Sanitizer Error detected in bgp_confederation_astype.test_bgp_confederation_astype/r2.asan.bgpd.15045 ================================================================= ==15045==ERROR: LeakSanitizer: detected memory leaks Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7f5666787b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40) #1 0x7f56661867c7 in qrealloc lib/memory.c:112 #2 0x55a3b4736a40 in bgp_confederation_peers_add bgpd/bgpd.c:681 #3 0x55a3b46b3363 in bgp_confederation_peers bgpd/bgp_vty.c:2068 #4 0x7f5666109021 in cmd_execute_command_real lib/command.c:978 #5 0x7f5666109a52 in cmd_execute_command_strict lib/command.c:1087 #6 0x7f5666109ab1 in command_config_read_one_line lib/command.c:1247 #7 0x7f5666109d98 in config_from_file lib/command.c:1300 #8 0x7f566623c6d0 in vty_read_file lib/vty.c:2614 #9 0x7f566623c7fa in vty_read_config lib/vty.c:2860 #10 0x7f56661682e4 in frr_config_read_in lib/libfrr.c:978 #11 0x7f5666226034 in event_call lib/event.c:1974 #12 0x7f566616942b in frr_run lib/libfrr.c:1214 #13 0x55a3b44f319d in main bgpd/bgp_main.c:510 #14 0x7f56651acc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) Indirect leak of 6 byte(s) in 1 object(s) allocated from: #0 0x7f5666720538 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x77538) #1 0x7f5666186898 in qstrdup lib/memory.c:117 #2 0x55a3b4736adb in bgp_confederation_peers_add bgpd/bgpd.c:687 #3 0x55a3b46b3363 in bgp_confederation_peers bgpd/bgp_vty.c:2068 #4 0x7f5666109021 in cmd_execute_command_real lib/command.c:978 #5 0x7f5666109a52 in cmd_execute_command_strict lib/command.c:1087 #6 0x7f5666109ab1 in command_config_read_one_line lib/command.c:1247 #7 0x7f5666109d98 in config_from_file lib/command.c:1300 #8 0x7f566623c6d0 in vty_read_file lib/vty.c:2614 #9 0x7f566623c7fa in vty_read_config lib/vty.c:2860 #10 0x7f56661682e4 in frr_config_read_in lib/libfrr.c:978 #11 0x7f5666226034 in event_call lib/event.c:1974 #12 0x7f566616942b in frr_run lib/libfrr.c:1214 #13 0x55a3b44f319d in main bgpd/bgp_main.c:510 #14 0x7f56651acc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) *********************************************************************************** ``` Signed-off-by: Keelan Cannoo <keelan.cannoo@icloud.com>
* Merge pull request #14811 from donaldsharp/zebra_final_shutdown_finallyChristian Hopps2023-11-281-27/+28
|\ | | | | Zebra final shutdown finally
| * bgpd: MTYPE_BGP was being overused split upDonald Sharp2023-11-211-27/+28
| | | | | | | | | | | | | | | | | | The MTYPE_BGP memory type was being over used as both the handler for the bgp instance itself as well as memory associated with name strings. Let's separate out the two. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: convert `struct interface->connected` to DLISTDavid Lamparter2023-11-221-4/+2
|/ | | | | | | | | | | | | | | | | Replace `struct list *` with `DLIST(if_connected, ...)`. NB: while converting this, I found multiple places using connected prefixes assuming they were IPv4 without checking: - vrrpd/vrrp.c: vrrp_socket() - zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(), irdp_advert_off() (these fixes are really hard to split off into separate commits as that would require going back and reapplying the change but with the old list handling) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* bgpd: Enable `enforce-first-as` by defaultDonatas Abraitis2023-10-271-0/+3
| | | | | | | | | | | It's been for a while disabled by default, but this seems reasonable to flip it. We had `bgp enforce-first-as` as a global BGP knob to enable/disable this behavior globally, later we introduced `enforce-first-as` per neighbor, with disabled by default. Now let's enable this by default by bringing a global `bgp enforce-first-as` command back. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* bgpd: Add `clear bgp capabilities` command to resend some dynamic capabilitiesDonatas Abraitis2023-10-201-0/+13
| | | | | | | For instance, it's not possible to resend FQDN capability without resetting the session, so let's create some more elegant way to do that. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* bgpd: Handle ORF capability using dynamic capabilitiesDonatas Abraitis2023-10-181-0/+22
| | | | | | | Add an ability to enable/disable ORF capability dynamically without tearing down the session. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* build: add -Wimplicit-fallthroughIgor Ryzhov2023-10-121-1/+0
| | | | | | | | | | Also: - replace all /* fallthrough */ comments with portable fallthrough; pseudo keyword to accomodate both gcc and clang - add missing break; statements as required by older versions of gcc - cleanup some code to remove unnecessary fallthrough Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* Merge pull request #14537 from opensourcerouting/feature/bgpd_aodRuss White2023-10-111-0/+1
|\ | | | | bgpd: Implement EBGP-OAD peering type
| * bgpd: Implement EBGP-OAD peering typeDonatas Abraitis2023-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | At each EBGP boundary, BGP path attributes are modified as per [RFC4271], which includes stripping any IBGP-only attributes. Some networks span more than one autonomous system and require more flexibility in the propagation of path attributes. It is worth noting that these multi-AS networks have a common or single administrative entity. These networks are said to belong to One Administrative Domain (OAD). It is desirable to carry IBGP-only attributes across EBGP peerings when the peers belong to an OAD. This document defines a new EBGP peering type known as EBGP-OAD, which is used between two EBGP peers that belong to an OAD. This document also defines rules for route announcement and processing for EBGP-OAD peers. https://datatracker.ietf.org/doc/html/draft-uttaro-idr-bgp-oad Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | Merge pull request #14528 from ↵Russ White2023-10-111-1/+1
|\ \ | | | | | | | | | | | | opensourcerouting/feature/bgpd_handle_addpath_capability_via_dynamic_capability bgpd: Handle Addpath capability using dynamic capabilities
| * | bgpd: Handle Addpath capability using dynamic capabilitiesDonatas Abraitis2023-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | Changing Addpath type, and or disabling RX (receiving) flag, we can do this without tearing down the session, and using dynamic capabilities. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | | Revert "bgpd: add bgp link-state address-family configuration context"Donald Sharp2023-10-101-10/+2
| | | | | | | | | | | | This reverts commit ae2f3bb5b4eed01df1f7a69c7710c9be519390f6.
* | | Revert "bgpd: display link-state prefixes detail"Donald Sharp2023-10-101-2/+0
| | | | | | | | | | | | This reverts commit 7e0d9ff8ba984966689562553afe2734b04c8539.
* | | Revert "bgpd: add linkstate debug"Donald Sharp2023-10-101-2/+0
| |/ |/| | | | | This reverts commit de38eada9c0527758bca34984d2f018670d74c9a.
* | bgpd: Add guards for zlog_debug when setting GTSM for the peerDonatas Abraitis2023-10-031-3/+6
|/ | | | Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* Merge pull request #12649 from louis-6wind/bgp-link-stateRuss White2023-09-261-2/+14
|\ | | | | bgpd: add basic support of BGP Link-State RFC7752
| * bgpd: add linkstate debugLouis Scalbert2023-09-181-0/+2
| | | | | | | | | | | | | | Add the "debug bgp linkstate" command to display incoming link-states prefixes. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * bgpd: display link-state prefixes detailLouis Scalbert2023-09-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BGP link-state prefixes are displayed in the form of NLRI-TYPE / Prefix-Length. > r2# show bgp all > > For address family: Link State > BGP table version is 8, local router ID is 192.0.2.2, vrf id 0 > Default local pref 100, local AS 65002 > Network Next Hop Metric LocPrf Weight Path > *> Link/153 0 65001 i > *> IPv6-Prefix/77 0 65001 i > *> IPv4-Prefix/57 0 65001 i > *> Node/49 0 65001 i > *> Node/45 0 65001 i Add a lib prefix display hook in bgpd to display properly all the details. > r2# show bgp all > > For address family: Link State > BGP table version is 8, local router ID is 192.0.2.2, vrf id 0 > Default local pref 100, local AS 65002 > Network Next Hop Metric LocPrf Weight Path > *> Link OSPFv3 ID:0xffffffffffffffff {Local {AS:4294967295 ID:4294967295 Area:4294967295 Rtr:10.10.10.11:2.2.2.2} Remote {AS:4294967295 ID:4294967295 Area:4294967295 Rtr:10.10.10.10:1.1.1.1} IPv4:10.1.0.1 Neigh-IPv4:10.1.0.2 IPv6:2001::1 Neigh-IPv6:2001::2 MT:0,2}/153 > 0 65001 i > *> IPv6-Prefix OSPFv3 ID:0x20 {Local {AS:65001 ID:0 Area:0 Rtr:10.10.10.10} MT:2 OSPF-Route-Type:1 IPv6:12:12::12:12/128}/77 > 0 65001 i > *> IPv4-Prefix OSPFv2 ID:0x20 {Local {AS:65001 ID:0 Area:0 Rtr:10.10.10.10:1.1.1.1} IPv4:89.10.11.0/24}/57 > 0 65001 i > *> Node OSPFv2 ID:0x20 {Local {AS:65001 ID:0 Area:0 Rtr:10.10.10.10:1.1.1.1}}/49 > 0 65001 i > *> Node OSPFv2 ID:0x20 {Local {AS:65001 ID:0 Area:0 Rtr:10.10.10.10}}/45 > 0 65001 i Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
| * bgpd: add bgp link-state address-family configuration contextLouis Scalbert2023-09-181-2/+10
| | | | | | | | | | | | | | | | | | | | | | Add the bgp link-state configuration context cli: > router bgp 65001 > address-family link-state link-state > neighbor 192.0.2.2 activate > exit-address-family Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* | bgpd: Set TCP min MSS per listenerDonatas Abraitis2023-09-181-0/+2
|/ | | | | | Set only if at least one peer is in passive mode. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* Merge pull request #14399 from opensourcerouting/fix/bgpd_handle_BGP_MAX_ATTRJafar Al-Gharaibeh2023-09-121-2/+2
|\ | | | | bgpd: BGP_ATTR_MAX can be 255, allow using it for path attr
| * bgpd: BGP_ATTR_MAX can be 255, allow using it for path attr discard/withdraw ↵Donatas Abraitis2023-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | cmds https://www.rfc-editor.org/rfc/rfc2042.html says: 255 reserved for development In FRR, 255 is kinda used too BGP_ATTR_VNC, even more we allow setting 255 in CLI. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* | bgpd: Move the peer->su to connection->suDonald Sharp2023-09-101-66/+77
| | | | | | | | | | | | The sockunion is per connection. So let's move it over. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | bgpd: Convert bgp_network.c to use peer_connectionDonald Sharp2023-09-101-9/+11
| | | | | | | | | | | | | | Modify bgp_network.c to use a peer_connection as it's prime parameters. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | bgpd: Expose bgp_peer_connection_free and make it a double pointerDonald Sharp2023-09-101-6/+8
| | | | | | | | | | | | | | The bgp_peer_connection_free function should be exposed outside of bgpd.c so that it can be used. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | bgpd: bgp_fsm_change_status/BGP_TIMER_ON and BGP_EVENT_ADDDonald Sharp2023-09-101-21/+21
| | | | | | | | | | | | | | | | | | Modify bgp_fsm_change_status to be connection oriented and also make the BGP_TIMER_ON and BGP_EVENT_ADD macros connection oriented as well. Attempt to make peer_xfer_conn a bit more understandable because, frankly it was/is confusing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | bgpd: peer_established should be connection orientedDonald Sharp2023-09-101-24/+30
| | | | | | | | | | | | The peer_established function should be connection oriented. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | bgpd: make bgp_keepalives_on|off connection orientedDonald Sharp2023-09-101-1/+1
| | | | | | | | | | | | | | The bgp_keepalives_on|off functions should use a peer_connection as a basis for it's operation. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | bgpd: make bgp_timer_set use a peer_connection insteadDonald Sharp2023-09-101-6/+6
| | | | | | | | | | | | | | The bgp_timer_set function should use a peer_connection pointer instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | bgpd: bgp_notify_send use peer_connection instead of peerDonald Sharp2023-09-091-60/+67
| | | | | | | | | | | | The bgp_notify_send function should use a peer_connection Signed-off-by: Donald Sharp <sharpd@nvidia.com>