summaryrefslogtreecommitdiffstats
path: root/pimd/pim_rpf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pimd: Fix to Tx S,G Join when SGRpt->Join stateChirag Shah2017-05-181-6/+7
| | | | | | | | | | | | | | | | -Upon Rx (*,G) Join w/o SGRpt at RP, trigger (S,G) Join towards FHR, unset SGRpt flag from channel, add (*,G) oif to (S,G) entry. -Add I am not RP check to triger SGRpt on *,G path otherwise, send S,G Prune on SPT path from RP to FHR upon receving *,G Prune. -Upon Rx SGRpt receive, remove OIF(downstream where Prune received) from specific S,G. Testing Done: pim-smoke Ran 95 tests in 11790.552s FAILED (SKIP=10, failures=4) Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* pimd: Fix WG/SGRpt & WG J/P processingChirag Shah2017-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | During processing of Join/Prune, for a S,G entry, current state is SGRpt, when only *,G is received, need to clear SGRpt and add/inherit the *,G OIF to S,G so it can forward traffic to downstream where *,G is received. Upon receiving SGRpt prune remove the inherited *,G OIF. From, downstream router received *,G Prune along with SGRpt prune. Avoid sending *,G and SGRpt Prune together. Reset upstream_del reset ifchannel to NULL. Testing Done: Run failed smoke test of sending data packets, trigger SPT switchover, *,G path received SGRpt later data traffic stopped S,G ages out from LHR, sends only *,G join to upstream, verified S,G entry inherit the OIF. Upon receiving SGRpt deletes inherited oif and retains in SGRpt state. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* pimd: fix pimd crashes around pim rpfChirag Shah2017-04-251-5/+8
| | | | | | | | During neighbor down event, all upstream entries rpf lookup may result into nhop address with 0.0.0.0 and rpf interface info being NULL. Put preventin check where rpf interface info is accessed. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* pimd: Pim Nexthop Tracking support with ECMPChirag Shah2017-04-251-20/+47
| | | | | | | | | | | | | | | | | | | | | | | In this patch, PIM nexthop tracking uses locally populated nexthop cached list to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks the first nexthop as RPF. Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob. By default, PIM ECMP is disabled. Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache entry to switch new path based on hash chosen path. Introduced, show command to display pim registered addresses and respective nexthops. Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G). Re-Register an address with nexthop when Interface UP event received, to ensure the PIM nexthop cache is updated (being PIM enabled). During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if any of nexthop's IPv4 address changes/resolves due to neigbor UP event. Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events. Executed pim-smoke with knob disabled. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com> (cherry picked from commit cba444817883b8b3b22a7ed9958dc9ed77f76230)
* Merge pull request #280 from donaldsharp/more_pimJafar Al-Gharaibeh2017-03-211-3/+23
|\ | | | | More pim
| * pimd: Consider interface change a RPF_CHANGED eventDonald Sharp2017-03-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose you have a unnumbered ecmp connections between two switches: st1-l3# show ip pim neighbor Interface Neighbor Uptime Holdtime DR Pri swp52 6.0.0.10 00:00:01 00:00:29 1 swp53 6.0.0.10 00:00:06 00:00:26 1 And for a given (S,G) the RPF goes: st1-l3# show ip nht 99.1.1.1 resolved via bgp fe80::4e76:25ff:fee7:42d1, via swp52 fe80::4e76:25ff:fee7:42d5, via swp53 Client list: pim(fd 14) Now suppose, 52 is the choosen RPF( since we can only pick one ) and the interface goes down. As such we will choose to use swp53. The problem was that the pim_rpf_update call is made it will change the rpf interface to 53, but not tell the calling function that the RPF_CHANGED because it is only looking at the rpf_addr(the nexthop) to see if it is changed and if we are in an unnumbered dual ecmp to the same box it was not detecting and notifying. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: Nexthop tracking supportChirag Shah2017-03-161-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Add pim Nexthop tracking feature 1st part where, specific RP or Source address (unicast address) register with Zebra. Once nexthop update received from Zebra for a given address, scan RP or upstream entries impacted by the change in nexthop. Reviewed By: CCR-5761, Donald Sharp <sharpd@cumulusnetworks.com> Testing Done: Tested with multiple RPs and multiple *,G entries at LHR. Add new Nexthop or remove one of the link towards RP and verify RP and upstream nexthop update. similar test done at RP with multiple S,G entries to reach source. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | *: Remove non-vrf based ifindex lookupDonald Sharp2017-03-151-1/+1
|/ | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Join/Prune AggregationDonald Sharp2017-03-021-2/+2
| | | | | | | | Add the ability for PIM to send Join/Prunes as an aggregated message instead of individual messages for each S,G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Refactor pim_rpf_update to take a 'struct pim_rpf'Donald Sharp2017-02-241-13/+14
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup compile warningsDonald Sharp2017-01-191-2/+2
| | | | | | Cleanup some compile warnings in pim on *bsd. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge remote-tracking branch 'origin/master' into pim_lib_work2Donald Sharp2017-01-181-1/+0
|\
| * build: remove $Format tagsDavid Lamparter2016-12-201-2/+0
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | pimd: Fix core when bouncing interfacesDonald Sharp2016-12-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When you bounce interfaces and the system is under heavy load there exists situations where zebra may or may not have told us the new ifindex, but we've requested a nexthop lookup, which bypasses normal mechanisms for zebra communication, we may get back a ifindex that we may have not created a ifp for yet. Ticket: CM-14052 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
* | pimd: Cleanup nexthop debuggingDonald Sharp2016-12-221-1/+1
| | | | | | | | | | | | | | When debugging nexthops, we print allot of unnecessary data Move some debugs to trace detail to reduce log clutter. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pim-nexthop: set the correct nexthop address in the rpf info.anuradhak2016-12-221-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a nexthop lookup is done we can get an ECMP output. But not all nexthops are pim neighbors. If for this reason PIM chose a nexthop other than the first the rpf info was not being set correctly i.e. nexthop ip was still the one associated with the first path but interface was set to the one associated with second path. This problem is seen on a link flap in the CLOS topology. Ticket: CM-13714 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Allow storing of sg in string formatDonald Sharp2016-12-221-4/+4
| | | | | | | | | | | | | | | | Debugs are extremely expensive currently. Let's store 'struct prefix_sg sg' string format in the ifchannel, upstream and msdp_sa structures. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Add the ability to test if the RPF' is the sameDonald Sharp2016-12-221-0/+9
| | | | | | | | | | | | | | Test the ability to see if two RPF' are the same or not. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: When nexthop_lookup fails allow a retry.Donald Sharp2016-12-221-5/+1
| | | | | | | | | | | | | | | | We are seeing situations where nexthop lookups are failing unexpectedly. Don't consider the lookup to have succeeded in this case to allow the next lookup to work? Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Add basic nexthop lookup cached information.Donald Sharp2016-12-221-2/+50
| | | | | | | | | | | | | | Cache the last time we looked up the nexthop for this particular address. Store time to usec accuracy. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Fix pim_nexthop_lookupDonald Sharp2016-12-221-9/+12
| | | | | | | | | | | | | | There are situations where we may never look at a better route for nexthop_lookup. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: replace grp_str[100] with grp_str[INET_ADDRSTRLEN]Daniel Walton2016-12-221-6/+6
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
* | pimd: Further work to fix rpf lookups and nbrsDonald Sharp2016-12-221-3/+4
| | | | | | | | | | | | | | | | | | When we do a RPF lookup return a path that we have neighbors for in those cases where we need to have a neighbor to pass along the SG state via a pim join/prune message. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Turn off neighbor lookup for the momentDonald Sharp2016-12-221-0/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Rework approach for needing nbrsDonald Sharp2016-12-221-51/+70
| | | | | | | | | | | | | | | | | | | | | | Pim sometimes needs the upstream rpf lookup to only take into account if we have a nbr out the selected interface or not. Move the code for this to a better spot so we can make a more intelligent decision here. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Use MULTIPATH_NUM for maxpathsDonald Sharp2016-12-221-3/+3
| | | | | | | | | | | | | | | | When looking up nexthops for a address, just use the MULTIPATH_NUM as the number allowed to receive instead of an arbitrary limit of 20 paths. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Fix unguarded log messageDonald Sharp2016-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | In pim_rpf.c when we receive multiple paths for the rpf we are complaining that we are not sure what to do with it yet. Change the _info to _debug and don't print out unless we are debugging stuff. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Fix up rp initialization breakageDonald Sharp2016-12-221-4/+4
| | | | | | | | | | | | | | | | | | | | When I converted over to using 'struct prefix' I broke the initialization of the rp. In addition, I used the wrong AFI type to switch on in pim_rpf.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: switch pim_rpf.h to use 'struct prefix' for addressDonald Sharp2016-12-221-17/+55
| | | | | | | | | | | | | | | | mrib_nexthop_addr and rpf_addr should be 'struct prefix' so that we can safely handle unnumbered data from a nexthop lookup in zebra Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Switch 'struct in_addr' to 'struct prefix' in pim_zlookup.hDonald Sharp2016-12-221-2/+2
| | | | | | | | | | | | | | | | This is setup code to allow us to receive v6 addresses from a nexthop lookup from zebra. This will allow us to work with unnumbered interfaces. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Fix debugs to be more logicalDonald Sharp2016-12-221-4/+4
| | | | | | | | | | | | | | | | | | The rpf debugs really should be zebra debugs instead of trace debugs. Additionally fix a return 0; to return NULL; Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd - Fix rpf lookup to what it was originallyDonald Sharp2016-12-221-47/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I tried to be smart and skirt around rpf lookup if I knew the incoming interface. This turns out to be not necessarily a good thing because we can easily have asymetrical routing. This fix removes the attempt to cache the ifp we received the incoming packet on and just lets the lookup work like it should. Additionally it removes the weird hardcoding of the rpf interface from the register stuff. Ticket: CM-12530 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> reb
* | pimd: Properly isolate zlookupDonald Sharp2016-12-221-1/+1
| | | | | | | | | | | | | | The qpim_zclient_lookup was a global variable. This is not needed. Isolate appropriately Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Remove unnecessary QuaggaIdDonald Sharp2016-12-221-1/+0
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: more source,group conversion to prefix sgDonald Sharp2016-12-221-1/+1
| | | | | | | | | | | | | | Convert more of the code to pass around a 'struct prefix sg' instead of individual struct addr's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Refactor s,g information to struct prefix in pim_upstream.hDonald Sharp2016-12-221-25/+9
|/ | | | | | This change allows us to pass the (s,g) state around as a prefix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Separate pim vif index spot from ifindexDonald Sharp2016-06-181-0/+2
| | | | | | | | | Allow pim to separate out the pim vif index from the ifindex. This change will allow pim to work with up to 255(MAXVIFS) interfaces, while also allowing the interface ifindex to be whatever number it needs to be. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pim: Fix NOCACHE to use incoming interfaceDonald Sharp2016-06-171-35/+46
| | | | | | | | | | | When the kernel sends a NOCACHE message to pim we were looking up the interface to use for the incoming multicast packet based upon the source. No need to do that trust that the kernel has properly identified it and use that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup some comments and documentationDonald Sharp2016-05-261-1/+0
| | | | | | | | Starting the transition of PIM-SSM to PIM-SM means that we have to cleanup some internal code comments so that the code will match the comments. Signed-off-by: Donald Sharp<sharpd@cumulusnetworks.com
* pimd: Receive and transmit (*,G) to the RPDonald Sharp2016-05-261-1/+1
| | | | | | | Receive a (*,G) route and send it upstream to the RP. The RP at this time does not properly handle the route. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup zebra debugs to be protected by debug commandsDonald Sharp2016-05-261-7/+7
| | | | | | | | pimd is very chatty without any pim debugs turned on. This commit fixes a bunch of the debugs to be protected by appropriate pim debug statement. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: merge pimd as of 2015-01-19David Lamparter2016-05-261-0/+260
Welcome pimd to the Quagga daemon zoo! This is a merge of commit 77ae369 ("pimd: Log ifindex found for an interface when zebra lib reports a new connected address."), with the intermediate "reconnect" changes removed (c9adf00...d274381). d274381 is replaced with b162ab7, which includes some changes. In addition, 4 reconnect-related changes and 1 cosmetic one have been bumped out. The rebase command used to produce the branch that is merged here is: git rebase --onto b162ab7 c9adf00 77ae369 Note that 3 patches had their author rewritten from "Anonymous SR#108542 <>" (which is not a valid git author ID) to: "Savannah SR#108542 <nbahr@atcorp.com>" (which is the e-mail address listed in the associated Savannah ticket) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>