Donald Sharp [Thu, 15 Sep 2016 20:50:08 +0000 (16:50 -0400)]
pimd: Further work to fix rpf lookups and nbrs
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>
Donald Sharp [Thu, 15 Sep 2016 14:18:28 +0000 (14:18 +0000)]
pimd: Rework approach for needing nbrs
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>
Donald Sharp [Thu, 15 Sep 2016 00:51:28 +0000 (20:51 -0400)]
pimd: Only use paths that we have nbrs on
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>
Donald Sharp [Mon, 12 Sep 2016 19:09:28 +0000 (15:09 -0400)]
pimd: Startup does not need to assert
When pim starts up there is no need to assert in pim_init
if state is not set as wanted. Especially for qpim_debugs
as that I would like to turn on debugs before we even start
doing anything in the code.
As for the PIM_MROUTE_IS_ENABLED, the variable is set
right above it, so no need to assert on it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 7 Sep 2016 19:43:17 +0000 (15:43 -0400)]
pimd: Fix unguarded log message
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>
Donald Sharp [Wed, 7 Sep 2016 19:36:43 +0000 (15:36 -0400)]
pimd, zebra: Allow v6 based nexthops to work in pim
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>
Donald Sharp [Wed, 7 Sep 2016 13:06:47 +0000 (09:06 -0400)]
pimd: Allow ip address selection for BGP unnumbered
When a interface is configured as BGP unnumbered, it
has a v6 LL address as well as no v4 addresses. In
this case let's look at the lo's ip address as the
primary address to use.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
rebase
Donald Sharp [Thu, 1 Sep 2016 22:49:53 +0000 (18:49 -0400)]
pimd: Allow interfaces to be unnumbered.
Specify the ifindex of the interface that we want
to turn on IP_MULTICAST_IF on instead of the
address. If we pass in the address then the
fact that we have multiple interfaces with the
same ip address causes confusion in the kernel.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 29 Aug 2016 14:49:47 +0000 (10:49 -0400)]
pimd: trigger on nbr up to look at rpf cache
If a neighbor comes up *after* igmp joins and *after* all
the routes are installed into the kernel, then we never
go back and fix up the rpf cache information. So joins
never go out for those igmp joins.
Ticket: CM-12613 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 26 Aug 2016 13:40:08 +0000 (09:40 -0400)]
pimd: Further refinement of switch on a stick
The original modification to allow the RP to receive
packets on the incoming interface when it has
no outgoing interfaces was a bit aggressive and
turned all register events into a join event.
This further divides up the code to do the
right thing in each situation.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 24 Aug 2016 14:25:11 +0000 (10:25 -0400)]
pimd: Turn on forwarding for a late added interface.
If we receive a join for a upstream interface that hasn't
yet been added to pim for working under it, we never
go back and add the forwarding on when we get the
interface added to pim.
Ticket: CM-11800 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 23 Aug 2016 17:39:48 +0000 (17:39 +0000)]
pimd: Fix bad state no FHR after quagga restart
If on the FHR we have an established stream between
interested parties and we stop the stream and restart
quagga we were not coming back up into the correct
state. For the multicast stream.
Ticket: CM-12462 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 22 Aug 2016 18:59:24 +0000 (14:59 -0400)]
pimd: On RP Allow no output interfaces
On the RP when we receive a register packet for the
same interface that we received the *,G join on
allow the RP to receive the packets but to do
nothing with them.
Additionally check the last_used values even
if the ioctl fails.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 19 Aug 2016 17:25:20 +0000 (13:25 -0400)]
pimd - Fix rpf lookup to what it was originally
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
Donald Sharp [Wed, 17 Aug 2016 00:08:03 +0000 (20:08 -0400)]
pimd: Restarting Quagga sometimes lost mroutes
When on a intermediate switch between the FHR and RP
when Quagga is restarted. Pimd is coming up so fast
and getting the S,G join before networking is properly
working on the switch. We would never install the
mroute in this case.
What was happening is that the scan of the S,G was
occurring and we were figuring out who we should talk
to but we were never installing the route for it.
Notice that we've never installed the route and install it
if the mroute has changed.
Ticket: CM-12460 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 16 Aug 2016 20:19:14 +0000 (16:19 -0400)]
pimd: Use correct function to delete upstream information
When the keep alive timer finds that we are no longer
sending packets for that particular S,G, remove
the upstream information but use the function that
makes sure we check the ref count.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 10 Aug 2016 20:16:22 +0000 (16:16 -0400)]
pimd: Fix RP shenanigans
The RP was not properly handling the series of events:
1) When a WRVIFWHOLE is received if we are the RP,
send a pim register stop to the FHR.
2) When a register was received we were sending
a join (S,G) towards the S, then a immediate prune (S,G)
followed by another join (S,G). Just send the first join
3) Save whom we received the S,G register from so we
can use it later
4) Allow a join timer to restart itself instead
of causing a crash.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 9 Aug 2016 17:02:27 +0000 (13:02 -0400)]
zebra: Allow netlink_talk to choose the filter function to call
The netlink_talk call sends a message to the kernel, which
with netlink_talk_filter only waits for the ACK.
It would be nice to have the ability to specify what the handler
function would be for when we send queries about mcast S,G routes
so that we can gather the data returned from the kernel.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 8 Aug 2016 14:24:02 +0000 (10:24 -0400)]
pimd: Fix another SA issue
pim_zebra.c was checking to see if a ifp pointer was null
in some debug statements. This caused the SA code
to assume that if we were at this point then the ifp
could be null and subsuquent code that doesn't check
for it to be wrong.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 8 Aug 2016 13:37:51 +0000 (09:37 -0400)]
pimd: Fix some SA issues
SA found these two issues:
1) Check of ifp non-null caused other non-checks down code
to assume ifp could be null. This is not the case.
If we get a callback at this point we must have a valid ifp pointer.
2) We were inadvertently calling igmp_source_reset_gmi with
a possible NULL source pointer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 6 Aug 2016 10:26:05 +0000 (06:26 -0400)]
pimd: Send hello immediately with receive of new genid
When we receive a new genid from a neighbor, we need
to form the neigbhor relationship before the join/prune
messages are sent to the neighbor.
Additionally we were calling the
pim_upstream_rpf_genid_changed function 2 times
in a row. This function just spun throught the upstream
list and marked all relevant upstreams to be sent
immediately
Ticket:CM-11979 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>