summaryrefslogtreecommitdiff
path: root/pimd/pim_zlookup.c
AgeCommit message (Collapse)Author
2016-12-21pimd,zebra: Pass back error message if receivedDonald Sharp
When zebra asks for mroute information let pim know that the request failed or succeeded. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21lib, pimd: Modify writen to retry on certain failuresDonald Sharp
When writen fails, allow itto retry on certain failures until it succeeds. Ticket: CM-12986 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Rework approach for needing nbrsDonald Sharp
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>
2016-12-21pimd: Allow loopbacks to resolveDonald Sharp
When doing a rpf check ensure that if we've considered the RP to be a loopback allow there to be no neighbor on the other side. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Only use paths that we have nbrs onDonald Sharp
When looking up nexthops for a path, we should only allow nexthops that we actually have neighbors formed for. Otherwise when we send join/prune messages they will do nothing. Ticket:CM-12754 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd, zebra: Pass the ifindex for NEXTHOP_TYPE_IPV4Donald Sharp
NEXTHOP_TYPE_IPV4 has the ifindex of the route. Pass it along so the other side can use it if it is needed. This will make pim much happier in that we will need to do less recursive lookups. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Use MULTIPATH_NUM for maxpathsDonald Sharp
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>
2016-12-21pimd, zebra: Allow v6 based nexthops to work in pimDonald Sharp
When we get a v6 address/ifindex combo back from a v4 lookup. Check to see if the outgoing interface only has one neighbor and if so use that neighbors loopback address as the route to use. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Switch 'struct in_addr' to 'struct prefix' in pim_zlookup.hDonald Sharp
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>
2016-12-21pimd: Fix duplicate code in zlookupDonald Sharp
In the nexthop lookup routine, fix the duplicate code to not check for too many indexes earlier. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Track the # of times we ask for nexthp informationDonald Sharp
Keep an idea of how many times we are asking zebra for nexthop information. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Fix unwrappered debug messageDonald Sharp
When checking with zebra about lastused we were not protecting a debug message. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21lib, pimd, zebra: Allow pimd to ask the kernel about mroute infoDonald Sharp
When we need to lookup the mroute info for a route. Allow pimd to ask the kernel. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Properly isolate zlookupDonald Sharp
The qpim_zclient_lookup was a global variable. This is not needed. Isolate appropriately Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21pimd: Remove unnecessary QuaggaIdDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-20build: remove $Format tagsDavid Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-09-02bgpd, lib, ospfd, pimd, zebra: Use nexthop_types_tDonald Sharp
Use the 'enum nexthop_types_t' instead of the zebra.h #defines. And remove code from zebra.h that does not belong there. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-06-09lib/zclient: Consolidate error reporting for zclient_read_headerDonald Sharp
All functions that call zclient_read_header immediately turn around and check to ensure that the version and marker fields are correct Move this code into zclient_read_header Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> (cherry picked from commit a9d4cb33faa6af622240190a80f41c4672374925)
2016-06-01pimd: Allow command zclient to find it's dataDonald Sharp
pim has two zclient sockets to zebra. One is used exclusively to do mrib lookups. The other is to do the normal day to day communication between pim and zebra. With the change to the zebra api to send up all data to all sockets this caused the mrib lookup socket to accumulate data in between mrib lookups. So if at some point in time we get upcoming data but no mrib lookups modify the code to find the mrib lookup it is looking for. Long term we need to figure something else out but this change will get us moving forward again. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-05-26lib: Fix vrf_id_t data typeDonald Sharp
We were reading a u_int16_t for vrf_id_t. While technically the same thing, I'd like to make sure we think about vrf_id_t's as vrf_id_t's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-26pimd: Double read of streamDonald Sharp
The addition of the zclient_read_header call reads the entirety of the stream for you and makes sure it's consistent with the header. When the function call was added it read the stream data in zclient_read_header and then reread the data after that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: Fix nexthop resolution breakageDonald Sharp
Nexthop resolution was broken due to some ill placed debug statements. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: Cleanup zebra debugs to be protected by debug commandsDonald Sharp
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>
2016-05-25bgpd/pimd: fix zAPI parsingNicolas Dichtel
Commit c99f3481a598 has changed the API. Now, the vrfid has been added in the header, thus we must read it before parsing the rest of the message. To ease code maintenance, let's add a new function to read a zAPI header. Fixes: c99f3481a598 ("*: add VRF ID in the API message header") Reported-by: Martin Winter <mwinter@opensourcerouting.org> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> Tested-by: Martin Winter <mwinter@opensourcerouting.org>
2016-05-25pimd: Rework pim to handle changes between us and upstreamDonald Sharp
The code in pimd needs to be updated to handle the changes we've made to api's that it depends on. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-05-25pimd: merge pimd as of 2015-01-19David Lamparter
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>