FRR Mirror
  1. FRR Mirror

FRR

Public
AuthorCommitMessageCommit dateIssues
Russ WhiteGitHubRuss White
b9ae5280eb7MMerge pull request #22059 from opensourcerouting/fix/move_srte_color_from_attrbgpd: Move srte_color from attr struct to bgp_path_info_extra
Russ WhiteGitHubRuss White
65d56be26aaMMerge pull request #21878 from donaldsharp/negative_creationIn a removal operation do not allow a creation of the route_node in bgp
Donatas AbraitisDonatas Abraitis
ad953baad32bgpd: Pass bgp_path_info instead of bgp_path_info_extra when comparing bpi'sSigned-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas AbraitisDonatas Abraitis
33d7b7b50debgpd: Move bgp_path_info_get_srte_color to bgp_route.[ch]Since srte_color is moved from struct attr, move the getter outside attr as well. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas AbraitisDonatas Abraitis
41f63e2a993bgpd: Add bgp_path_info_extra_same helper to compare extra fieldsSince srte_color is moved from struct attr to struct bgp_path_info_extra, we need still to compare it if it's the same or not before UPDATE/WITHDRAW/LEAK, so let's do this with this new helper method. Maybe something more fields need to be checked/compared in the future. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas AbraitisDonatas Abraitis
9d23a3a58adbgpd: Move srte_color from attr struct to bgp_path_info_extrastruct attr is used for BGP attributes, but srte_color is just encoded as an extended community. Move this srte_color member to bgp_path_info_extra struct to avoid confusions and occupying 4-bytes for attr if not needed at all. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Mark StappGitHubMark Stapp
ab2f6b0dad2MMerge pull request #22084 from donaldsharp/carrier_changeszebra: Track netlink carrier changes value
Donald SharpGitHubDonald Sharp
b984b3888a5MMerge pull request #22080 from opensourcerouting/fix/bgp_use_after_free_orfbgpd: Fix use-after-free for ORF case
Donald SharpDonald Sharp
0344252a318bgpd: Use lookup not get for VNC pdest on new route in rfapiUse lookup to avoid a get/free cycle on the removal case. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
84981371a09bgpd: Use lookup not get for VNC pdest on attr change add in rfapiUse a lookup to avoid the creation/deletion of a node in the removal case. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
270f2601930bgpd: Use lookup not get for VNC pdest on new route in bgp_updateUse a lookup to avoid a get/free cycle in the deletion case. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
84d9abbbebebgpd: Use lookup not get for VNC pdest on attr change add in bgp_updateAvoid a alloc/free cycle on the removal case by doing a lookup instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
a1cd1d73f2abgpd: Use lookup not get for VNC pdest on attr change delete in rfapiWhen removing a node, use lookup instead of a get/free cycle. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
0d06a675672bgpd: Use lookup not get for VNC implicit withdraw pdest in bgp_updateDo not use a get operation on withdrawal, do a lookup and only do the withdrawal if found, to avoid a alloc/free cycle. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
c3100427749bgpd: Use lookup not get for VNC pdest in del_vnc_routeSwitch to _lookup for finding the parent dest and not create and then delete the node on deletion. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
d1c663b52fabgpd: Use lookup not get for VNC withdraw pdest in bgp_rib_withdrawConvert get of the two level table into a lookup so that there is no creation/deletion of the table on withdrawal. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
3954a9e4af9bgpd: Do not create rd table if negate of network statementDo not create the rd table if in a negate operation. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Russ WhiteGitHubRuss White
9df00ece2d8MMerge pull request #21893 from donaldsharp/no_kernel_nhg_originalNo kernel nhg original
Donald SharpDonald Sharp
a9f4c379aa5zebra: Track netlink carrier changes valueTurns out netlink lets us know how many times a carrier change has happened. Keep track of it. At this point do nothing with it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Mark StappGitHubMark Stapp
e1f40adb12aMMerge pull request #21911 from Manpreet-k0/evpn_fix_v6zebra: fix DVNI route encap type for IPv6 VTEPs
Russ WhiteGitHubRuss White
d457a68ed92MMerge pull request #21943 from donaldsharp/ldpd_cleanup_of_shutdownCleanup of memory allocation and usage of events
Donatas AbraitisDonatas Abraitis
6ae21da9bfbbgpd: Fix use-after-free for ORF caseThis is similar to ffff1a1, and 3d43d7b. Just mirror and use the same pattern to avoid dangling pointers for orf_plist. ==1==ERROR: AddressSanitizer: heap-use-after-free on address 0x508000037638 at pc 0x7f4daf26dae3 bp 0x7fffb1118f40 sp 0x7fffb1118f30 READ of size 4 at 0x508000037638 thread T0 0 0x7f4daf26dae2 in prefix_list_apply_ext lib/plist.c:789 1 0x55b2c256c487 in subgroup_anno...
Donald SharpDonald Sharp
1a1ea7724ddbfdd: No need to reinitialize a variable 2 timesThe md_alg variable is being set 2 times, no need. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
9e70538a753*: Remove null pointer checks on codeXCALLOC/XMALLOC and XREALLOC cannot fail, as such checking for NULL is redundant and unnecessary, remove. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
d7f4bbe91cc*: use event_is_scheduled() for struct event * truth testsThe pattern: if (event) Should really be: if (event_is_scheduled(event)) Replace. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
5a1283e7a23*: Drop redundant if-guard before event_cancel()The pattern of: if (event) event_cancel(); makes no sense, just do a `event_cancel()`. That is sufficient. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
1d93c16ba76*: drop redundant struct event * NULL assignmentsThe event system when calling a event handler has already set the event pointer to NULL that was handed in. There is no need to do this again. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
0fa8dcd847bzebra: explicitly cancel event timers instead of null'ing pointerInstead of null'ing pointers, explicitly cancel the event timer as that leaving a event dangling is dangerous and causes problems. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
cadaab56d8dpimd: cancel pim sock read event before recreating socketThe code was using this as a pattern: event = NULL; event_add_timer(...,&event,...); This can leave a dangling event in the event system. Explicitly cancel and then restart. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
f2b613e120bbgpd: cancel rfapi withdraw timer before re-armingWe have this pattern: event = NULL event_add_timer(..., &event...); FRR code should never set a event to NULL as that any existing timer will be run but the ability to stop it has been lost, modify the code to cancel the event and then add the timer again. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
fe65d6c5e0bospfd: use XCALLOC for ospf_apiserver allocationsospf_apiserver.c is using XMALLOC for alloc'ing memory, switch over to XCALLOC and drop the NULL pointer assignments to event structures as well as the memset. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
2c6f5637785ldpd: Cleanup event system handling of pointersThere are several classes of problems: a) event pointer is set to NULL inside the handler function. This is unnecessary and redundant, so we can safely remove the set. b) event_cancel is called then the event pointer is set to NULL. Again this is redundant. c) fresh calloc call we set the event pointer to NULL. This is redundant. d) Actual bug, use malloc to grab memory and then call some ...
Donald SharpGitHubDonald Sharp
dced53dac3cMMerge pull request #22034 from louis-6wind/fix-wrong-neigh-nsidzebra: fix neighbor entries ns_id
Jafar Al-GharaibehGitHubJafar Al-Gharaibeh
eefe600e32cMMerge pull request #21795 from opensourcerouting/pim-jp-refactorpimd,tests: refactor PIM join prune packet generation
David LamparterGitHubDavid Lamparter
3123102b18bMMerge pull request #21815 from kalash-nexthop/bmp-no-local-as-prependbgpd: bmp: don't prepend local-AS to AS_PATH in BMP updates
Russ WhiteGitHubRuss White
27bb0c21701MMerge pull request #22039 from Jafaral/autorp-cleanuppimd: fix AutoRP stale RPs and selective multicast joins, add missing docs
Donatas AbraitisGitHubDonatas Abraitis
b42a812da16MMerge pull request #22057 from Jafaral/fix-flaky-bgp-testtests: harden bgp_conditional_advertisement_track_peer convergence waits
Kalash NainwalKalash Nainwal
472601437fcbgpd: bmp: force 32-bit ASN encoding for BMP route monitoringBMP route-monitoring messages need a stable AS_PATH ASN encoding width: the per-peer header's A flag (RFC 7854 4.2) tells the collector whether AS_PATH ASNs are 2-byte or 4-byte. FRR's BMP code never sets the A flag (only V and L are ever set in bgp_bmp.c), so every BMP message advertises A=0 (4-byte AS_PATH format). However, the AS_PATH bytes that bgp_packet_attribute() actually writes to the...
Kalash NainwalKalash Nainwal
231e91a7b04bgpd: bmp: don't prepend local-AS to AS_PATH in BMP updatesBMP Route Monitoring messages for monitored routes carried an AS_PATH with the local AS prepended, as if the route were being re-advertised outbound. Observed with a peer in AS 40001 advertising 100.100.100.1/32 to a router in AS 40002: "as_path":[40002,40001], "as_path_count":2, "peer_asn":40001 The collector expected AS_PATH=[40001] -- the value as received from the peer -- but saw [400...
Rafael ZalamenaGitHubRafael Zalamena
036b428dee2MMerge pull request #20003 from Jafaral/pim-sm-dm-fixpimd: move dense (S,G) to sparse mode when an RP is added
Jafar Al-GharaibehJafar Al-Gharaibeh
e23f58e1f4cpimd: defer AutoRP default discovery until config is appliedDo not start AutoRP discovery from VRF enable. Apply default-on discovery from northbound apply_finish callbacks on the auto-rp container and pim address-family once configuration is committed, and track when discovery-enabled is explicitly configured so "no autorp discovery" is honored before any join is attempted. Runtime VRFs created after initial config load still receive default discovery...
Jafar Al-GharaibehJafar Al-Gharaibeh
812312d0aecdocs: document AutoRP discovery purge and mapping agentDocument immediate removal of learned RPs when discovery is disabled and add user guide coverage for autorp send-rp-discovery. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Jafar Al-GharaibehJafar Al-Gharaibeh
d4e240bfccbtests: verify AutoRP joins only required multicast groupsAdd selective group join coverage and update disable/enable expectations for discovery-only routers. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Jafar Al-GharaibehJafar Al-Gharaibeh
42b90e33ce1pimd: join AutoRP multicast groups based on active roleJoin 224.0.1.40 only for discovery and 224.0.1.39 only for mapping agents, instead of always joining both groups. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Jafar Al-GharaibehJafar Al-Gharaibeh
71e3de315dftests: verify AutoRP RPs are purged when discovery is disabledAdd a topotest that learns an AutoRP RP, disables discovery, and checks that only static RP entries remain in rp-info. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Jafar Al-GharaibehJafar Al-Gharaibeh
bf5061a5585pimd: purge learned AutoRP RPs when discovery is disabledRemove AutoRP-installed RPs immediately on `no autorp discovery` instead of waiting for the discovery hold timer to expire. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Jafar Al-GharaibehJafar Al-Gharaibeh
b6cc804543dtests: harden bgp_conditional_advertisement_track_peer convergence waitsbgp_conditional_advertisement_track_peer.test_bgp_conditional_advertisement_track_peer fails intermittently on loaded CI hosts (e.g. AddressSanitizer Debian 12 amd64): AssertionError: R1 SHOULD receive 172.16.255.2/32 from R2 After enabling the R2-R3 session, R1 must learn 172.16.255.2/32 only once R2 receives the exist-map prefix 172.16.255.3/32 from R3 and the conditional advertisement sc...
Rafael ZalamenaRafael Zalamena
89e0c832c48tests: PIM join prune test topologyNetwork topology with three routers simulating a big number of IGMP joins to stress test the PIM join prune code path. The router 3 sends 2000 IGMP joins to router 1, router 1 sends PIM join prune to router 2. The test checks if all the IGMP joins are learned by router 1 (and if they successfully were sent to router 2) and then check if router 2 received all the PIM joins. Signed-off-by: Raf...
Rafael ZalamenaRafael Zalamena
cbcb428a4b0pimd: refactor PIM join prune packet generationThe previous version of the code had three problems: 1. There was no upper limit on the amount of sources a group could have and when that number was too high it would cause a buffer overflow 2. When the first group had too many sources an empty group would be generated 3. When a group have too many sources there was no code to split them into multiple packets The refactor addr...
Russ WhiteGitHubRuss White
32395426284MMerge pull request #22055 from Jafaral/fix-flaky-pim-acl-testtests: fix flaky IGMP source baseline in pim_boundary_acl