summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #7353 from AnuradhaKaruppiah/mh-cleanup-fix-1Donatas Abraitis2020-10-213-13/+16
|\ | | | | bgpd: fix crash in the MH cleanup handling
| * bgpd: fix crash in the MH cleanup handlingAnuradha Karuppiah2020-10-213-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | The MH datastructures were being released before the paths that were referencing them. Fix is to do the MH cleanup last. The MH finish function has also been stripped down to only do a datastructure cleanup i.e. avoid sending route updates etc. Ticket: 31376 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
* | Merge pull request #7350 from qlyoung/improve-bug-report-templateMark Stapp2020-10-211-7/+61
|\ \ | |/ |/| .github: improve bug report template
| * .github: improve bug report templateQuentin Young2020-10-201-7/+61
| | | | | | | | | | | | | | | | | | - Enclose template help text in HTML comments so that it does not show up in issues - Add more help text explaining what is requested - Yell to increase visibility Signed-off-by: Quentin Young <qlyoung@nvidia.com>
* | Merge pull request #7276 from donaldsharp/speedup_isis_topotestsMartin Winter2020-10-2126-6/+31
|\ \ | | | | | | tests: add `lsp-gen-interval 2` to isis configuration
| * | tests: add `lsp-gen-interval 2` to isis configurationDonald Sharp2020-10-1026-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | Force faster generation of lsp's and also cause the networks to converge faster. All affected tests run faster now. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | Merge pull request #7356 from sworleys/Revert-NHG-DependentsDonatas Abraitis2020-10-211-20/+11
|\ \ \ | | | | | | | | Revert "zebra: fix NHE dependents backpointer relationship"
| * | | Revert "zebra: fix NHE dependents backpointer relationship"Stephen Worley2020-10-201-20/+11
|/ / / | | | | | | | | | This reverts commit f9f9466e04ae9625d8bd8dd3346a221e6430b231.
* | | Merge pull request #7348 from mjstapp/fix_router_id_listsDonald Sharp2020-10-201-0/+3
|\ \ \ | |_|/ |/| | zebra: clean up all router id lists
| * | zebra: clean up all router id listsMark Stapp2020-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | Clean up the ipv6 router-id lists associated with a zvrf - these were being leaked. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | | Merge pull request #7206 from ckishimo/fix7086Russ White2020-10-201-6/+10
|\ \ \ | | | | | | | | ospfd: flush type 5 when type 7 is removed
| * | | ospfd: flush type 5 when type 7 is removedckishimo2020-09-291-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the ASBR stops announcing a prefix into the NSSA area, the LSA type 7 is removed from the area. However the ABR is refreshing the type 5 in its LSDB while removing the Type 7 LSA. Routers outside the area do not get an update. With the following topology: r1---r2---r3, with r3 being the ASBR announcing type 7 LSA: r3 configuration router ospf redistribute static network 10.0.23.0/24 area 1 area 1 nssa ! We stop announcing prefix 3.3.3.3 in the ASBR r3# conf r3(config)# router ospf r3(config-router)# no redistribute static r3(config-router)# r2 (ABR) r2# sh ip os database NSSA-external Link States (Area 0.0.0.1 [NSSA]) Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 33.33.33.33 3600 0x8000002f 0x13be E2 3.3.3.3/32 [0x0] <-- flushed AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 7 0x8000002f 0x73c7 E2 3.3.3.3/32 [0x0] <-- refreshed(?) With PR#7086 the LSA type 5 is flushed from the LSDB in r2 and the change is announced to routers outside the area (r1) r2# sh ip os da NSSA-external Link States (Area 0.0.0.1 [NSSA]) Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 33.33.33.33 3600 0x80000002 0x6d91 E2 3.3.3.3/32 [0x0] <-- flushed AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0] <-- flushed r1# sh ip os da AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0] <-- flushed Unfortunately I just realized that with PR#7086 I'm introducing a new bug, as Type-5 LSA are not being refreshed when reaching MaxAge r2# sh ip os da NSSA-external Link States (Area 0.0.0.1 [NSSA]) Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 33.33.33.33 35 0x80000002 0x6d91 E2 3.3.3.3/32 [0x0] <--- refreshed AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0] <--- not refreshed! So this PR should fix the original issue and the bug introduced later, so when stopping redistribution in the ASBR, both type 5 and type 7 are flushed: r2# sh ip os da NSSA-external Link States (Area 0.0.0.1 [NSSA]) Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 33.33.33.33 3600 0x80000002 0x6d91 E2 3.3.3.3/32 [0x0] AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0] Routers outside the area are also notified r1# sh ip os da Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 3600 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0] Re-enabling redistribution, both LSA will be advertised again r3# conf r3(config)# router ospf r3(config-router)# no redistribute static r3(config-router)# redistribute static r3(config-router)# r2# sh ip os da NSSA-external Link States (Area 0.0.0.1 [NSSA]) Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 33.33.33.33 19 0x80000001 0x6f90 E2 3.3.3.3/32 [0x0] AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 11 0x80000001 0xcf99 E2 3.3.3.3/32 [0x0] and they are refreshed when reaching MaxAge NSSA-external Link States (Area 0.0.0.1 [NSSA]) Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 33.33.33.33 10 0x80000002 0x6d91 E2 3.3.3.3/32 [0x0] <-- Seq 2 AS External Link States Link ID ADV Router Age Seq# CkSum Route 3.3.3.3 10.0.25.2 2 0x80000002 0xcd9a E2 3.3.3.3/32 [0x0] <-- Seq 2 Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
* | | | Merge pull request #7323 from ton31337/fix/inet_ntoa_to_pFX_masterDonald Sharp2020-10-2017-279/+360
|\ \ \ \ | | | | | | | | | | bgpd: Convert inet_ntoa to %pI4
| * | | | bgpd: Convert inet_ntoa to %pI4/inet_ntopDonatas Abraitis2020-10-1817-279/+360
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | | Merge pull request #7311 from donaldsharp/table_lock_countDonatas Abraitis2020-10-2028-225/+147
|\ \ \ \ \ | | | | | | | | | | | | Abstract rn->lock accessing and cleanup usage to %pFX and %pRN
| * | | | | ospf6d: Convert to using %pFXDonald Sharp2020-10-171-28/+10
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | ospfd: Convert to using %pFXDonald Sharp2020-10-176-39/+28
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | ripd: Convert to using %pFXDonald Sharp2020-10-172-29/+18
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | ripngd: Convert to using %pFXDonald Sharp2020-10-172-38/+23
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | lib: Convert usage of strings to %pFX and %pRNDonald Sharp2020-10-173-60/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert over to using the %pFX and %pRN modifiers to output strings to allow us to consolidate on one standard for printing prefixes. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | *: Create/Use accessor functions for lock countDonald Sharp2020-10-1715-33/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create appropriate accessor functions for the rn->lock data. We should be accessing this data through accessor functions since it is private data to the data structure. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | | | Merge pull request #7289 from sworleys/NHG-Crash-StartMark Stapp2020-10-201-40/+55
|\ \ \ \ \ \ | | | | | | | | | | | | | | zebra: a couple NHG fixes
| * | | | | | zebra: fix NHE dependents backpointer relationshipStephen Worley2020-10-191-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparantly the dependents backpointer trees for singletons got broken at some point and we never noticed. There is not really any code making use of this right now so not suprising but let's go ahead and fix it for zebra and proto NHGs. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| * | | | | | zebra: only track NHEs from the dataplane for ID usageStephen Worley2020-10-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's just track the NHEs we get from the kernel(dplane) for ID usage with internal routes. I tried to be smart originally and allow them to be re-used internal to zebra but its proving to cause more bugs than it's worth. This doesn't break any functionality. It just means we won't use NHEs we get from the kernel with our routes, we will create new ones. Decided this based on various bugs seen ith the lastest one being on startup with this kernel state: ``` [root@alfred frr-2]# ip next ls id 15 via 192.168.161.1 dev doof scope link proto zebra id 17 group 15 proto zebra [root@alfred frr-2]# ip ro show 3.3.3.1 3.3.3.1 nhid 17 via 192.168.161.1 dev doof ``` Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| * | | | | | zebra: add from_dplane info for NHE creationStephen Worley2020-10-131-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a param to the common NHE creation callstack so we can know if this is one we have read in from the dataplane. We can add some logic on how to handle these special ones later. I considered putting this on a struct as a flag or something but it would have required it being put on struct nexthop since we have some `*_find_nexthop()` functions that can be called when given NHEs from the dataplane. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
* | | | | | | Merge pull request #7344 from sworleys/Show-IP-RoRuss White2020-10-201-0/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | zebra: add alias for "show ip/ipv6 ro"
| * | | | | | | zebra: add alias for "show ip/ipv6 ro"Stephen Worley2020-10-191-0/+10
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an alias so people can still type `show ip ro`. It became ambigious in a recent release. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
* | | | | | | Merge pull request #7346 from opensourcerouting/leafref-circular-chainRuss White2020-10-201-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | yang: fix circular chain of leafrefs
| * | | | | | | yang: fix circular chain of leafrefsRenato Westphal2020-10-201-1/+1
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following libyang error when trying to load the "frr-nexthop" module explicitly (e.g. using the 'gen_northbound_callbacks' tool): libyang: A circular chain of leafrefs detected. (/frr-nexthop:frr-nexthop-group/nexthop-groups/name) libyang: Invalid value "frr-nexthop-grouping" of "uses". (/frr-nexthop:frr-nexthop-group/frr-nexthop-grouping) libyang: Copying data from grouping failed. (/frr-nexthop:frr-nexthop-group/frr-nexthop-grouping) libyang: Module "frr-nexthop" parsing failed. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | | | | | | Merge pull request #7300 from sworleys/EVPN-RType-NUMsPatrick Ruddy2020-10-205-111/+134
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | lib,bgpd: more evpn route-type numerical command versions
| * | | | | | bgpd: numerical evpn type support to route-map cmdsStephen Worley2020-10-131-14/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add numberical evpn route-type support to route-map evpn commands. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| * | | | | | bgpd: numerical evpn type support to debug commandsStephen Worley2020-10-133-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add number evpn route type support for debug commands. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| * | | | | | bgpd: make debug evpn help use string constantsStephen Worley2020-10-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the debug evpn help commands use evpn string constants for evpn route type info. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| * | | | | | bgpd: numerical evpn type support to more show cmdsStephen Worley2020-10-131-77/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add numberical evpn route type support to some more show commands. Also, simplify some of the code there to call common type parsing function. Some of the bounds checking there is also unncessary given how our cli node matching works. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
| * | | | | | lib: consolidate evpn type help strings into macroStephen Worley2020-10-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consolidate evpn type help strings into one single macro for use on commands that need to support all the types. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
* | | | | | | Merge pull request #7333 from mjstapp/fix_multi_connectedDonald Sharp2020-10-181-10/+5
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | zebra: support multiple connected subnets on an interface
| * | | | | | zebra: support multiple connected subnets on an interfaceMark Stapp2020-10-161-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We support configuration of multiple addresses in the same subnet on a single interface: make sure that zebra supports multiple instances of the corresponding connected route. Signed-off-by: Mark Stapp <mjs@voltanet.io>
* | | | | | | Merge pull request #7267 from donaldsharp/plist_relaxerDonatas Abraitis2020-10-181-3/+3
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | lib: Relax usage of `ip prefix-list A.B.C.D/M ge Y`
| * | | | | | lib: Relax usage of `ip prefix-list A.B.C.D/M ge Y`Donald Sharp2020-10-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the prefix length M must be less than Y. Relax this restriction to allow M to be less than or equal to Y. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | | | | Merge pull request #7336 from donaldsharp/sharp_one_oneDonatas Abraitis2020-10-171-2/+3
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | sharpd: Fix nexthop group name collision
| * | | | | | sharpd: Fix nexthop group name collisionDonald Sharp2020-10-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have two nexthop groups named one oneone then the sharp daemon will treat them as the same nexthop group. This is because we are doign this: static int sharp_nhg_compare_func(const struct sharp_nhg *a, const struct sharp_nhg *b) { return strncmp(a->name, b->name, strlen(a->name)); } The strlen should be the size of the array of name. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | | | | Merge pull request #7330 from donaldsharp/zebra_use_after_freeDonatas Abraitis2020-10-171-1/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | zebra: Fix use after free in debug path
| * | | | | | | zebra: Fix use after free in debug pathDonald Sharp2020-10-171-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When zebra is running with debugs turned on there is a use after free reported by the address sanitizer: 2020/10/16 12:58:02 ZEBRA: rib_delnode: (0:254):4.5.6.16/32: rn 0x60b000026f20, re 0x6080000131a0, removing 2020/10/16 12:58:02 ZEBRA: rib_meta_queue_add: (0:254):4.5.6.16/32: queued rn 0x60b000026f20 into sub-queue 3 ================================================================= ==3101430==ERROR: AddressSanitizer: heap-use-after-free on address 0x608000011d28 at pc 0x555555705ab6 bp 0x7fffffffdab0 sp 0x7fffffffdaa8 READ of size 8 at 0x608000011d28 thread T0 #0 0x555555705ab5 in re_list_const_first zebra/rib.h:222 #1 0x555555705b54 in re_list_first zebra/rib.h:222 #2 0x555555711a4f in process_subq_route zebra/zebra_rib.c:2248 #3 0x555555711d2e in process_subq zebra/zebra_rib.c:2286 #4 0x555555711ec7 in meta_queue_process zebra/zebra_rib.c:2320 #5 0x7ffff74701f7 in work_queue_run lib/workqueue.c:291 #6 0x7ffff7450e9c in thread_call lib/thread.c:1581 #7 0x7ffff738eaf7 in frr_run lib/libfrr.c:1099 #8 0x55555561a578 in main zebra/main.c:455 #9 0x7ffff7079cc9 in __libc_start_main ../csu/libc-start.c:308 #10 0x5555555e3429 in _start (/usr/lib/frr/zebra+0x8f429) 0x608000011d28 is located 8 bytes inside of 88-byte region [0x608000011d20,0x608000011d78) freed by thread T0 here: #0 0x7ffff768bb6f in __interceptor_free (/lib/x86_64-linux-gnu/libasan.so.6+0xa9b6f) #1 0x7ffff739ccad in qfree lib/memory.c:129 #2 0x555555709ee4 in rib_gc_dest zebra/zebra_rib.c:746 #3 0x55555570ca76 in rib_process zebra/zebra_rib.c:1240 #4 0x555555711a05 in process_subq_route zebra/zebra_rib.c:2245 #5 0x555555711d2e in process_subq zebra/zebra_rib.c:2286 #6 0x555555711ec7 in meta_queue_process zebra/zebra_rib.c:2320 #7 0x7ffff74701f7 in work_queue_run lib/workqueue.c:291 #8 0x7ffff7450e9c in thread_call lib/thread.c:1581 #9 0x7ffff738eaf7 in frr_run lib/libfrr.c:1099 #10 0x55555561a578 in main zebra/main.c:455 #11 0x7ffff7079cc9 in __libc_start_main ../csu/libc-start.c:308 previously allocated by thread T0 here: #0 0x7ffff768c037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037) #1 0x7ffff739cb98 in qcalloc lib/memory.c:110 #2 0x555555712ace in zebra_rib_create_dest zebra/zebra_rib.c:2515 #3 0x555555712c6c in rib_link zebra/zebra_rib.c:2576 #4 0x555555712faa in rib_addnode zebra/zebra_rib.c:2607 #5 0x555555715bf0 in rib_add_multipath_nhe zebra/zebra_rib.c:3012 #6 0x555555715f56 in rib_add_multipath zebra/zebra_rib.c:3049 #7 0x55555571788b in rib_add zebra/zebra_rib.c:3327 #8 0x5555555e584a in connected_up zebra/connected.c:254 #9 0x5555555e42ff in connected_announce zebra/connected.c:94 #10 0x5555555e4fd3 in connected_update zebra/connected.c:195 #11 0x5555555e61ad in connected_add_ipv4 zebra/connected.c:340 #12 0x5555555f26f5 in netlink_interface_addr zebra/if_netlink.c:1213 #13 0x55555560f756 in netlink_information_fetch zebra/kernel_netlink.c:350 #14 0x555555612e49 in netlink_parse_info zebra/kernel_netlink.c:941 #15 0x55555560f9f1 in kernel_read zebra/kernel_netlink.c:402 #16 0x7ffff7450e9c in thread_call lib/thread.c:1581 #17 0x7ffff738eaf7 in frr_run lib/libfrr.c:1099 #18 0x55555561a578 in main zebra/main.c:455 #19 0x7ffff7079cc9 in __libc_start_main ../csu/libc-start.c:308 SUMMARY: AddressSanitizer: heap-use-after-free zebra/rib.h:222 in re_list_const_first This is happening because we are using the dest pointer after a call into rib_gc_dest. In process_subq_route, we call rib_process() and if the dest is deleted dest pointer is now garbage. We must reload the dest pointer in this case. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | | | | | | Merge pull request #7306 from donaldsharp/bgp_dest_printDonatas Abraitis2020-10-1713-244/+247
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Bgp dest print
| * | | | | | | | doc: Add %pBD print formatter to docDonald Sharp2020-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | | | | bgpd: Use bgp_dest_get_prefix accessor functionDonald Sharp2020-10-172-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the appropriate bgp_dest_get_prefix accessor function Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | | | | bgpd: More bgp_node -> bgp_dest cleanupDonald Sharp2020-10-174-149/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some more of the bgp_node usage snuck in from big commits in the past month or so from feature work. Do some work to put it back to bgp_dest for incoming future work. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | | | | bgpd: Convert to %pFX or %pBD where possibleDonald Sharp2020-10-172-71/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Search and destroy places where we used prefix2str that could be replaced with %pFX or %pBD in bgpd. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | | | | | | | bgpd: add `%pBD` for printing `struct bgp_dest *`David Lamparter2020-10-178-23/+36
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `%pRN` is not appropriate anymore. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | | | | | | Merge pull request #7322 from Orange-OpenSource/ospf-srDonald Sharp2020-10-172-19/+23
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | ospfd: Store neighbor Adjacency SID in SR database