FRR Mirror
  1. FRR Mirror

FRR

Public
AuthorCommitMessageCommit dateIssues
Jafar Al-GharaibehGitHubJafar Al-Gharaibeh
69568746271MMerge pull request #21077 from cscarpitta/fix_bgp_ls_integer_truncation_srlg_tlvbgpd: Fix integer truncation of SRLG count when parsing SRLG TLV
Carmine ScarpittaCarmine Scarpitta
ef8a4c68cb7bgpd: Fix integer truncation of SRLG count when parsing SRLG TLV`count` is declared as `uint8_t` but receives `length / 4` where `length` is a `uint16_t`. For `length >= 1024`, the division result exceeds 255, which cannot be stored in `count` since `uint8_t` holds at most 255, and the value silently truncates. The result is then stored in `attr->srlg_count`, also `uint8_t`, which would re-truncate it. Widen `count` in `parse_srlg()` and `srlg_count` in ...
Jafar Al-GharaibehGitHubJafar Al-Gharaibeh
d24d94e7f39MMerge pull request #21053 from donaldsharp/zebra_neigh_continuedzebra: Remove neighbor table read on rule addition
Donald SharpGitHubDonald Sharp
5c4ca8895b3MMerge pull request #21056 from nick-bouliane/masterlib: fix zclient crash when many peers reconnect after FRR restart
Donald SharpGitHubDonald Sharp
97fbd8a3bdfMMerge pull request #20991 from y-bharath14/srib-yang-V12yang: Fix pyang errors in frr-ospf6-route-map.yang
Russ WhiteGitHubRuss White
4371fec5c9bMMerge pull request #21057 from chiragshah6/zdev3*: fix spell checks round 6
Russ WhiteGitHubRuss White
07441903befMMerge pull request #20893 from donaldsharp/ensure_basic_config_has_time_to_completetests: Convert lots of places to use run_and_expect
Nick BoulianeNick Bouliane
b140f846315lib: fix zclient crash when many peers reconnect after FRR restartReplace select() with poll() in zclient_read_sync_response() to avoid FD_SETSIZE (1024) limit. When the zebra socket fd exceeds 1024, FD_SET() triggers __fdelt_warn and aborts. poll() has no such limit. Handle POLLNVAL, POLLHUP, and POLLERR explicitly to avoid busy-spin on socket errors, matching the pattern from lib/event.c. Backtrace before fix: ``` Mar 09 22:16:42 core frrinit.sh[898790]:...
Donald SharpGitHubDonald Sharp
8f737b1ab3eMMerge pull request #21052 from opensourcerouting/fix/best_path_reasonbgpd: Fix BGP best path reasoning when using ECMPs with router-id
Donatas AbraitisGitHubDonatas Abraitis
d6952710185MMerge pull request #20470 from cscarpitta/feature/bgp_linkstate
Carmine ScarpittaCarmine Scarpitta
3a97a2faf9cdoc: Add documentation for BGP-LSSigned-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
78deb305498tests: Add BGP-LS topotest suiteAdd pytest topology test for BGP Link-State covering producer and consumer modes with ISIS IGP backend. Tests BGP-LS capability negotiation, NLRI advertisement/reception (Node, Link, Prefix), and dynamic topology change propagation including route additions/removals and link state changes. Verifies BGP-LS updates flow correctly from IGP through BGP-LS producer to BGP-LS consumer. Signed-off-...
Carmine ScarpittaCarmine Scarpitta
399c64b834abgpd: Set nexthop for BGP-LS based on peer address familyBGP-LS routes advertised to peers require a nexthop with the same address family as the peer session (IPv4 peer needs IPv4 nexthop, IPv6 peer needs IPv6 nexthop). The MP_REACH_NLRI and MP_UNREACH_NLRI encoding code in bgp_attr does not have direct knowledge of the peer's address family, making it unable to select the appropriate nexthop address family for BGP-LS advertisements. Add peer flags...
Carmine ScarpittaCarmine Scarpitta
1da3f4420cbbgpd: Parse BGP-LS NLRI received from peersAdd inbound BGP-LS message processing to receive Link-State topology information from BGP peers. When BGP receives a BGP UPDATE message from a peer, it calls bgp_nlri_parse() to parse the NLRI. The bgp_nlri_parse() function checks the SAFI (Subsequent Address Family Identifier) contained in the UPDATE message and dispatches to the appropriate SAFI-specific handler. Currently supported SAFIs in...
Carmine ScarpittaCarmine Scarpitta
d70169ee48fbgpd: Unregister from lsdb on terminationCall bgp_ls_unregister() in bgp_ls_terminate() to cleanly unregister from the zebra link-state database when BGP instance terminates. This ensures proper cleanup and stops receiving IGP topology updates when the BGP-LS functionality is no longer needed. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
aa7c9b97f20bgpd: Receive BGP-LS attributeAdd bgp_attr_ls() function to parse and intern BGP-LS attributes (Type 29) from received BGP update messages. The function validates peer configuration, parses Type 29 TLVs, and interns the resulting attribute for use in route processing. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
bfb67d5364abgpd: Encode BGP-LS NLRI and attribute when building UPDATE packetAdd BGP-LS encoding support to UPDATE message generation for transmitting Link-State topology information to peers. Implement bgp_packet_ls_attribute() to encode BGP-LS Attribute (Type 29) by dispatching to type-specific encoders (node/link/prefix attributes). Extend packet building functions to accept ls_nlri parameter: - bgp_packet_attribute() - encode BGP-LS attribute when present - bgp_pa...
Carmine ScarpittaCarmine Scarpitta
50e92bbb7f4bgpd: Add BGP-LS AFI/SAFI to negotiation functionsAdd BGP-LS capability checks to peer activity and address family negotiation functions. Update peer status and capability negotiation functions to include BGP-LS AFI/SAFI: - peer_active() - Check if peer has BGP-LS configured - peer_active_nego() - Check if BGP-LS was negotiated with peer - peer_group_af_configured() - Check if peer group has BGP-LS enabled - bgp_open_option_parse() - Validat...
Carmine ScarpittaCarmine Scarpitta
abccc105243bgpd: Add BGP-LS capability display supportAdd display support for BGP-LS multi-protocol capability in BGP OPEN message output. Update bgp_capability_vty_out() to properly display BGP-LS capabilities: - Display "AFI BGP-LS" for AFI_BGP_LS (16388) - Display "SAFI BGP-LS" for SAFI_BGP_LS (71) - Add JSON output support for BGP-LS capabilities This allows users to verify BGP-LS capability negotiation between peers using "show bgp neighbo...
Carmine ScarpittaCarmine Scarpitta
c85fff38ea3bgpd: Register for linkstate db updates when peer is activatedRegister for Link State database updates when the first BGP-LS peer is activated, and unregister when the last peer is deactivated. Modify peer_activate() and peer_deactivate() to manage Link State database registration based on active BGP-LS peers: - When first peer is activated for link-state address family, call bgp_ls_register() to subscribe to IGP topology updates from zebra - When las...
Carmine ScarpittaCarmine Scarpitta
5251bf3aa4avtysh: Integrate BGP-LS node into vtyshIntegrate BGP_LS_NODE into vtysh to enable link-state address family configuration. This allows users to configure BGP-LS through vtysh using: router bgp 65000 address-family link-state neighbor <peer> activate exit-address-family Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
5ccafe4b1c1bgpd: Add show commands for BGP-LS NLRIsAdd commands to display BGP Link-State NLRIs from the BGP RIB. New commands: - show bgp link-state link-state [json] Display all BGP-LS routes with node/link/prefix NLRIs - show bgp link-state link-state NLRI [json] Display specific BGP-LS route by NLRI identifier NLRI format: [Type][ID][Protocol][Instance][AS][Area][Descriptors...] Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
a20dfd7c816bgpd: Add BGP-LS configuration write supportExtend bgp_config_write() to serialize BGP Link-State address family configuration. This enables BGP-LS configuration to be: - Displayed via show running-config - Saved to startup-config (write memory) - Written to configuration files Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
d4f914528b7bgpd: Add BGP-LS address family CLI commandsInstall BGP_LS_NODE in the CLI node hierarchy and add commands to activate and configure BGP Link-State address family. New commands: - address-family link-state [link-state] Enters BGP-LS configuration mode under router bgp - neighbor PEER activate Activates BGP-LS address family for the specified neighbor Configuration example: router bgp 65000 neighbor 192.0.2.1 remote-as 65001 ...
Carmine ScarpittaCarmine Scarpitta
a3e90577db3lib: Add CLI node for BGP Link-State address family configurationAdd BGP_LS_NODE to enum node_type in command.h to enable BGP Link-State address family configuration mode. This allows creating a dedicated configuration context for BGP-LS: router bgp 65000 address-family link-state <BGP-LS specific commands> exit-address-family Follows the same pattern as other BGP address families (BGP_EVPN_NODE, BGP_SRV6_NODE). Signed-off-by: Carmine Sca...
Carmine ScarpittaCarmine Scarpitta
88ced6ec9eebgpd: Handle zebra opaque messagesAdd callback handler to process ZAPI Opaque messages from zebra containing Link State updates from IGP producers. Register bgp_zebra_opaque_msg_handler() as the callback for ZEBRA_OPAQUE_MESSAGE type in the zebra client handler table. The handler: - Decodes ZAPI Opaque message header using zclient_opaque_decode() - Routes Link State messages (LINK_STATE_SYNC, LINK_STATE_UPDATE) to bgp_ls_pr...
Carmine ScarpittaCarmine Scarpitta
baeefede22fbgpd: Add functions to parse updates received from linkstate dbAdd callback functions to parse and process Link State updates received from IGP producers via ZAPI Opaque messages. When IGPs (IS-IS, OSPF) detect topology changes, they send Link State Update messages through zebra to registered consumers. These functions handle the received messages: - bgp_ls_parse_update() - Parse ZAPI Opaque Link State messages - bgp_ls_process_node() - Process Node upda...
Carmine ScarpittaCarmine Scarpitta
31cffad03f2bgpd: Add BGP-LS update and withdraw functionsImplement BGP-LS route installation and withdrawal to enable processing of BGP-LS NLRIs received in BGP UPDATE messages. In BGP-LS, UPDATE messages contain BGP-LS NLRIs (not traditional prefixes). When a BGP UPDATE with BGP-LS NLRI is received, a bgp_dest is allocated to represent that NLRI location in the RIB and stored in the BGP RIB tree. The ls_nlri field in bgp_dest stores the BGP-LS NLRI...
Carmine ScarpittaCarmine Scarpitta
c8acf7a2c75bgpd: Add BGP-LS Attribute support to attr structureExtend the core BGP attribute structure to support BGP-LS Attributes (RFC 9552 Section 5.3) by adding ls_attr field and updating all related attribute processing functions. Changes: - Add ls_attr field to struct attr to store BGP-LS Attribute TLVs - Update attrhash_key_make() to include ls_attr in attribute hash key - Update attrhash_cmp() to compare ls_attr when present - Extend bgp_attr_inte...
Carmine ScarpittaCarmine Scarpitta
92404d7ae62bgpd: Add helper functions to register linkstate db notificationsAdd helper functions to register and unregister BGP-LS for Link State database notifications from IGP producers. In FRR's Link State architecture, consumers must register with zebra to receive ZAPI Opaque Link State Update messages from producers (IS-IS, OSPF). These functions wrap the Link State API registration mechanism: - bgp_ls_register() - Register to receive LS updates from IGPs - bgp_...
Carmine ScarpittaCarmine Scarpitta
337e6cd45bdbgpd: Add TED instance to BGP-LS data structureAdd Traffic Engineering Database (TED) instance to BGP-LS structure to store link-state topology. In FRR's Link State architecture, IGP protocols (IS-IS, OSPF) act as producers that build link-state databases from protocol exchanges and send updates via ZAPI Opaque messages. BGP-LS acts as a consumer that synchronizes with IGPs and listens for updates, maintaining a TED with the topology infor...
Carmine ScarpittaCarmine Scarpitta
9a95368f300bgpd: Add BGP-LS NLRI decode functionsAdd functions to parse BGP-LS NLRIs from wire format per RFC 9552. The decode functions parse NLRIs received in MP_REACH_NLRI and MP_UNREACH_NLRI path attributes into in-memory structures. - bgp_ls_decode_node_descriptor() - Parse Node Descriptor - bgp_ls_decode_link_descriptor() - Parse Link Descriptor - bgp_ls_decode_prefix_descriptor() - Parse Prefix Descriptor - bgp_ls_decode_node_nlri() ...
Carmine ScarpittaCarmine Scarpitta
1ff2315405fbgpd: Add BGP-LS NLRI encode functionsAdd functions to serialize BGP-LS NLRIs to wire format per RFC 9552. The encode functions convert in-memory NLRI structures to the TLV-based wire format used in MP_REACH_NLRI and MP_UNREACH_NLRI path attributes. - bgp_ls_encode_node_descriptor() - Encode Node Descriptors - bgp_ls_encode_link_descriptor() - Encode Link Descriptors - bgp_ls_encode_prefix_descriptor() - Encode Prefix Descriptors...
Carmine ScarpittaCarmine Scarpitta
5a49df37f5abgpd: Add error code for BGP-LS packet errorsAdd EC_BGP_LS_PACKET error code for BGP-LS NLRI and attribute packet parsing/encoding errors. This error code is used by BGP-LS decode functions to log warnings when malformed packets are received from peers, such as invalid TLV lengths, missing mandatory fields, or unknown NLRI types. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
8076ae20facbgpd: Add hash table to store BGP-LS AttributesImplement unified hash table for BGP-LS attribute interning and lookup. - Implement bgp_ls_attr_get(): Insert BGP-LS attribute into unified hash table, returning existing entry if already present or creating and inserting new entry - Implement bgp_ls_attr_lookup(): Search hash table for BGP-LS attribute matching the provided attributes - Implement bgp_ls_attr_intern(): Perform attribute ...
Carmine ScarpittaCarmine Scarpitta
81657bd198fbgpd: Add hash table to store BGP-LS NLRIsAdd hash table infrastructure to store BGP-LS NLRIs originated by the local node and received from peers. - Add nlri_hash to bgp_ls structure for NLRI storage - Add hash functions to compute hash keys and compare NLRIs - Add bgp_ls_nlri_intern() to insert NLRI and increment reference count - Add bgp_ls_nlri_unintern() to remove NLRI and decrement reference count - Add bgp_ls_entry_lookup() to ...
Carmine ScarpittaCarmine Scarpitta
e96a272c502bgpd: Add BGP-LS NLRI deep copy functionAdd function to create deep copy of BGP-LS NLRI structures. Used in subsequent commits for NLRI storage and management. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
186ba5f1db7bgpd: Add BGP-LS NLRI string conversion functionsAdd functions to convert BGP-LS enums to human-readable strings. Used for debugging output and display purposes. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
280716cfbebbgpd: Add BGP-LS NLRI size calculation helperAdd function to calculate wire format size of BGP-LS NLRI structures. Used in subsequent commits for NLRI encoding. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
86e38b2cdecbgpd: Add BGP-LS NLRI validation functionsAdd validation functions to verify BGP-LS NLRI is valid per RFC 9552. Used in subsequent commits to validate NLRIs received from peers. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
3e6d2ddcd36bgpd: Add BGP-LS NLRI comparison functionsAdd functions to determine if two BGP-LS NLRIs are equal. These functions will be used in subsequent commits for NLRI hash table lookups and duplicate handling. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
be4c9269a49bgpd: Add BGP-LS NLRI allocation and free functionsAdd memory management functions for BGP-LS NLRI structures. - Add bgp_ls_nlri_alloc() to allocate NLRI structures - Add bgp_ls_nlri_free() to free NLRI and cleanup dynamic fields - Add bgp_ls_attr_alloc() to allocate BGP-LS attribute structures - Add bgp_ls_attr_free() to free BGP-LS attributes and cleanup dynamic fields These functions handle proper initialization and cleanup of all NLRI t...
Carmine ScarpittaCarmine Scarpitta
e49a5cd8187bgpd: Add BGP-LS NLRI data structuresDefine structures for BGP Link-State topology elements per RFC 9552. - Add Node, Link, and Prefix NLRI structures - Support Node Descriptor TLVs (AS Number, BGP-LS ID, OSPF Area ID, IGP Router ID) - Support Link Descriptor TLVs (Link ID, IPv4/IPv6 interface/neighbor addresses, MT-ID) - Support Prefix Descriptor TLVs (OSPF Route Type, IP Reachability, MT-ID) - Define BGP-LS Attribute stru...
Carmine ScarpittaCarmine Scarpitta
301b23373c3bgpd: Add BGP-LS instance structure and initializationIntroduce core BGP-LS module infrastructure. - Add `struct bgp_ls` to hold BGP-LS state - Add `bgp_ls_init()` to initialize BGP-LS module during BGP instance creation - Add `bgp_ls_terminate()` to cleanup BGP-LS module during BGP instance destruction Subsequent commits will extend this structure with NLRI and TED support. Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
a98f8055d23bgpd: Add debugging support for BGP-LSAdd debugging support for BGP Link-State operations to aid development and troubleshooting. - Add `debug bgp link-state` command - Add `no debug bgp link-state` command - Extend `no debug bgp` to also disable link-state debugging - Show link-state debugging status in `show debugging bgp` Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
314b3eb5e6f*: Add BGP-LS AFI/SAFI constantsAdd BGP Link-State (BGP-LS) Address Family infrastructure to prepare for full protocol implementation in subsequent commits (RFC 9552). Introduce AFI_BGP_LS (16388) and SAFI_BGP_LS (71) and update all AFI/SAFI-aware code paths to recognize the new address family. Protocol-specific logic is marked with TODO placeholders to be implemented in subsequent commits. Signed-off-by: Carmine Scarpitta...
Donatas AbraitisGitHubDonatas Abraitis
d0509a21d96MMerge pull request #21005 from enkechen-panw/announce-check-fixbgpd: avoid premature memory allocation in subgroup_announce_check()
Donatas AbraitisGitHubDonatas Abraitis
4075663eed0MMerge pull request #20714 from robinchrist/docs/evpnDocs: Document `import vrf route-map NAME`, several EVPN improvements
Donatas AbraitisGitHubDonatas Abraitis
d6671d49183MMerge pull request #20914 from hnattamaisub/bgp_brief_jsonbgpd: Support brief option for show bgp neighbors command
Donatas AbraitisGitHubDonatas Abraitis
3063564fed0MMerge pull request #21054 from Jafaral/flowspec-fixbgpd: fix off-by-one error in FlowSpec operator array bounds check