]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
8 years agopimd: Modify pim_upstream_state2str for more usage
Donald Sharp [Fri, 19 Aug 2016 11:56:59 +0000 (07:56 -0400)]
pimd: Modify pim_upstream_state2str for more usage

Just pass in the actual state to allow us to translate
the state to a string even if we don't have a upstream.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix debug to properly display state
Donald Sharp [Thu, 18 Aug 2016 18:15:33 +0000 (14:15 -0400)]
pimd: Fix debug to properly display state

We should display the state the upstream is instead of
the number of the state.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Change RPF cache refresh time to 2 seconds
Donald Sharp [Thu, 18 Aug 2016 17:47:08 +0000 (13:47 -0400)]
pimd: Change RPF cache refresh time to 2 seconds

10 second delay is a bit too long.  Let's crank it down a bit
and see what happens.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Allow rp to configure it's keep alive timer
Donald Sharp [Thu, 18 Aug 2016 14:00:02 +0000 (10:00 -0400)]
pimd: Allow rp to configure it's keep alive timer

Allow the end user to supply a RP based keep alive
timer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: When the Keep Alive timer Pops Stop timers
Donald Sharp [Thu, 18 Aug 2016 13:44:52 +0000 (09:44 -0400)]
pimd: When the Keep Alive timer Pops Stop timers

When the Keep alive timer Pops stop the timer
and send a prune upstream if we need to
remove the state.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Allow keep alive timer configuration
Donald Sharp [Thu, 18 Aug 2016 13:07:14 +0000 (09:07 -0400)]
pimd: Allow keep alive timer configuration

Allow the user to specify the time to wait
for a keep alive to happen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix RP handling of Register message
Donald Sharp [Thu, 18 Aug 2016 00:44:51 +0000 (20:44 -0400)]
pimd: Fix RP handling of Register message

The RP needs to send the join when we want to send it

Also make sure the ka_timer is reset properly.

Ticket: CM-12473
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix register stop behavior
Donald Sharp [Wed, 17 Aug 2016 19:27:03 +0000 (19:27 +0000)]
pimd: Fix register stop behavior

Register stop was not being sent on a consistent basis.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add 'debug mroute detail'
Donald Sharp [Wed, 17 Aug 2016 01:13:22 +0000 (21:13 -0400)]
pimd: Add 'debug mroute detail'

When there is allot of IGMP activity for the
kernel upcall that we are ignoring, just
ignore it for the moment as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Restarting Quagga sometimes lost mroutes
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>
8 years agopimd: Fix typo in debug message
Donald Sharp [Tue, 16 Aug 2016 23:22:32 +0000 (19:22 -0400)]
pimd: Fix typo in debug message

The debug message was wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Use correct function to delete upstream information
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>
8 years agolib, pimd, zebra: Allow pimd to ask the kernel about mroute info
Donald Sharp [Thu, 11 Aug 2016 00:04:20 +0000 (00:04 +0000)]
lib, pimd, zebra: Allow pimd to ask the kernel about mroute info

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>
8 years agopimd: Fix igmp(*,G) not influencing S,G mroutes
Donald Sharp [Mon, 15 Aug 2016 11:28:36 +0000 (07:28 -0400)]
pimd: Fix igmp(*,G) not influencing S,G mroutes

When we receive a (*,G) route decide if we
need to cause any output interfaces to be
added to any S,G route associated.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Set spt bit when we receive first packet on RP
Donald Sharp [Thu, 11 Aug 2016 12:08:28 +0000 (08:08 -0400)]
pimd: Set spt bit when we receive first packet on RP

When on the RP, if we receive the first correctly routed
mroute from upstream, Set the SPT bit so that the
state machine will work properly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix register stop timer
Donald Sharp [Thu, 11 Aug 2016 11:07:15 +0000 (07:07 -0400)]
pimd: Fix register stop timer

1) Ensure Timer is actually off
2) I missread the rfc, when we are in prune state, just send the
register stop.  Do not add the tunnel device yet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix RP shenanigans
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>
8 years agozebra: Fully decode mcast messages
Donald Sharp [Wed, 10 Aug 2016 12:54:58 +0000 (08:54 -0400)]
zebra: Fully decode mcast messages

Fully decode mcast messages from the kernel.  We are not
doing anything with this at the moment, but that will
change.

Additionally convert over to using lookup for
displaying the route type.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Use single correct definition for prefix string buffer
vivek [Tue, 9 Aug 2016 22:54:14 +0000 (15:54 -0700)]
lib: Use single correct definition for prefix string buffer

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reivewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12262
Reviewed By: CCR-5065
Testing Done: Manual

8 years agopimd: Properly isolate zlookup
Donald Sharp [Tue, 9 Aug 2016 19:04:23 +0000 (19:04 +0000)]
pimd: Properly isolate zlookup

The qpim_zclient_lookup was a global variable.
This is not needed.  Isolate appropriately

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove some impossible error conditions.
Donald Sharp [Tue, 9 Aug 2016 18:25:12 +0000 (14:25 -0400)]
pimd: Remove some impossible error conditions.

It is impossible that we can hit these error conditions.
Remove them from the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Allow netlink_talk to choose the filter function to call
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>
8 years agopimd: Add WRVIFWHOLE callback.
Donald Sharp [Tue, 9 Aug 2016 16:30:26 +0000 (12:30 -0400)]
pimd: Add WRVIFWHOLE callback.

Naive implementation of the WRVIFWHOLE callback
from the kernel.

signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

8 years agopimd: Don't pass in src_str and grp_str
Donald Sharp [Tue, 9 Aug 2016 12:05:48 +0000 (08:05 -0400)]
pimd: Don't pass in src_str and grp_str

Allow sub functions to call pim_str_sg_dump as
appropriate

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Allow RP to clear based upon KAT(S,G)
Donald Sharp [Mon, 8 Aug 2016 22:56:05 +0000 (18:56 -0400)]
pimd: Allow RP to clear based upon KAT(S,G)

When the KAT(S,G) pops, allow the RP to clear the
mroute.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add the display of the Keep Alive Timer for upstream
Donald Sharp [Mon, 8 Aug 2016 19:55:52 +0000 (15:55 -0400)]
pimd: Add the display of the Keep Alive Timer for upstream

Add the ability to see the Keep Alive timer for
upstream information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix another SA issue
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>
8 years agopimd: Fix some SA issues
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>
8 years agopimd: Some SA analysis fixes.
Donald Sharp [Fri, 5 Aug 2016 07:23:33 +0000 (03:23 -0400)]
pimd: Some SA analysis fixes.

This commit addresses some SA issues found:

1) double set variables
2) value set but never used.
3) wrong return path used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Send hello immediately with receive of new genid
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>
8 years agopimd: multiple rp commands
Donald Sharp [Fri, 5 Aug 2016 17:08:06 +0000 (17:08 +0000)]
pimd: multiple rp commands

Allow the user to specify multiple rp commands.

'ip pim rp A.B.C.D'   -> translates to 'ip pim rp A.G.C.D 224.0.0.0/24'
ip pim rp A.B.C.D A.B.C.D/M
  First is the rp, second is the group with mask.

Groups and masks cannot be over each other except 224.0.0.0/24 which
is the fallback if used.

Ticket: CM-7860
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Refactor RP code and start the ability to handle ranges
Donald Sharp [Fri, 5 Aug 2016 13:07:46 +0000 (09:07 -0400)]
pimd: Refactor RP code and start the ability to handle ranges

Refactor the qpim_rp into pim_rp.c so that the global data
is protected.  This will allow us to easily add the group
ranges.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix some null register issues
Donald Sharp [Thu, 4 Aug 2016 16:58:47 +0000 (12:58 -0400)]
pimd: Fix some null register issues

The Null register bit was not properly being set and
the total length was wrong as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix join_desired for (*,G) states
Donald Sharp [Thu, 4 Aug 2016 16:06:58 +0000 (12:06 -0400)]
pimd: Fix join_desired for (*,G) states

When we are evaluating if we have a inherited_olist, include
the *,G state in determing what to do.

Additionally when we receive a join or prune of *,G
do the right thing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Was removing the wrong channel.
Donald Sharp [Thu, 4 Aug 2016 15:44:11 +0000 (11:44 -0400)]
pimd: Was removing the wrong channel.

When receiving a prune (*,G), we were removing
from the wrong channel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Enable WrongVif and WRWHOLEVIF callbacks.
Donald Sharp [Thu, 4 Aug 2016 15:09:30 +0000 (11:09 -0400)]
pimd: Enable WrongVif and WRWHOLEVIF callbacks.

Turn on Wrong Vif and Whole packet wrong vif callbacks.

Signed-off-by: Donald Sharp <sharpd@cumuusnetworks.com>
8 years agopimd: Fix broken build
Donald Sharp [Thu, 4 Aug 2016 00:57:47 +0000 (20:57 -0400)]
pimd: Fix broken build

I missed 2 instances of the conversion from struct prefix
to struct prefix_sg

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Remove unused variable.
Donald Sharp [Wed, 3 Aug 2016 23:53:42 +0000 (19:53 -0400)]
zebra: Remove unused variable.

Remove the rtnh variable since it is unused.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, pimd: Fix borked up prefix code
Donald Sharp [Tue, 2 Aug 2016 08:38:11 +0000 (04:38 -0400)]
lib, pimd: Fix borked up prefix code

Fix the struct prefix to be an actual struct prefix_sg.
This cleans up a bunch of code to make it look nicer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add rs_timer display
Donald Sharp [Wed, 3 Aug 2016 18:40:10 +0000 (14:40 -0400)]
pimd: Add rs_timer display

For the 'show ip pim upstream' command addd the RSTimer to the display

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix upstream state machine.
Donald Sharp [Wed, 3 Aug 2016 15:34:38 +0000 (11:34 -0400)]
pimd: Fix upstream state machine.

RFC 4601 4.5.7:
Joined
      The downstream state machines and local membership information
      indicate that the router should join the shortest-path tree for
      this (S,G).

The code has a upstream state that is in 'J' state already
due to a S,G multicast packet received on an incoming
interface.  This packet has been forwarded to the RP.
The RP sees this and immediately sends a join towards
the S,G.

The code as originally written assumed that you could
not transition from a J state to a J state.  This is not
true.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Change packet debug to pim register specific debug
Donald Sharp [Wed, 3 Aug 2016 15:32:15 +0000 (11:32 -0400)]
pimd: Change packet debug to pim register specific debug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add ability to debug pim Register packets
Donald Sharp [Wed, 3 Aug 2016 01:44:29 +0000 (21:44 -0400)]
pimd: Add ability to debug pim Register packets

Allow the user to specify the ability to debug
pim register packets.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove Wrong PIMREG ifchannel state
Donald Sharp [Tue, 2 Aug 2016 18:14:54 +0000 (14:14 -0400)]
pimd: Remove Wrong PIMREG ifchannel state

The PIMREG ifchannel state is an evolutionary dead-end.
I should not have introduced this code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Make the NOCACHE just set the regiface to the coil
Donald Sharp [Tue, 2 Aug 2016 17:12:31 +0000 (13:12 -0400)]
pimd: Make the NOCACHE just set the regiface to the coil

When we receive a NOCACHE upcall, add the pimreg interface
to the oil so that we can receive the data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Send join when a S,G is pruned
Donald Sharp [Tue, 2 Aug 2016 15:39:16 +0000 (11:39 -0400)]
pimd: Send join when a S,G is pruned

When a *,G is received, and we have S,G that is in a
non-joined state, Send the join to the S,G.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add upstream children finding
Donald Sharp [Tue, 2 Aug 2016 15:21:49 +0000 (11:21 -0400)]
pimd: Add upstream children finding

When we receive a *,g find all S,G that
are related and set pointer appropriately

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add Local Genid to 'show ip pim hello'
Donald Sharp [Tue, 2 Aug 2016 13:58:14 +0000 (09:58 -0400)]
pimd: Add Local Genid to 'show ip pim hello'

Display the local idea of what the Genid is

Ticket: CM-11980
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Allow the kernel to forward encap'ed packets for us
Donald Sharp [Tue, 2 Aug 2016 13:21:51 +0000 (09:21 -0400)]
pimd: Allow the kernel to forward encap'ed packets for us

When we get a pim register allow the kernel to forward the
saved packets.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: igmpv3.c was causing prune/join messages to be sent
Donald Sharp [Mon, 1 Aug 2016 17:06:35 +0000 (13:06 -0400)]
pimd: igmpv3.c was causing prune/join messages to be sent

We were erroneously sending a prune *,G immediately followed
by a join *,G under certain situations

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: change from ifchannels to oil's
Donald Sharp [Mon, 1 Aug 2016 16:29:58 +0000 (12:29 -0400)]
pimd: change from ifchannels to oil's

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: More macro fallout fix.
Donald Sharp [Mon, 1 Aug 2016 13:09:47 +0000 (09:09 -0400)]
pimd: More macro fallout fix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix pim_macro downstream_jpstate
Donald Sharp [Mon, 1 Aug 2016 12:29:00 +0000 (08:29 -0400)]
pimd: Fix pim_macro downstream_jpstate

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Create storage for a raw socket.
Donald Sharp [Sat, 30 Jul 2016 01:20:19 +0000 (21:20 -0400)]
pimd: Create storage for a raw socket.

Each interface needs the ability to send raw packets
at the RP.  Create the data structure to do so.
Further commits will create the socket as necessary
and send the packet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix DownstreamJPState(S,G,I) check.
Donald Sharp [Sat, 30 Jul 2016 01:02:17 +0000 (21:02 -0400)]
pimd: Fix DownstreamJPState(S,G,I) check.

Fix the
DownStreamJPState(S,G,I) and
DownStreamJPState(*,G,I) macros.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Allow ifchannel S,G's to know their *,G parent
Donald Sharp [Thu, 28 Jul 2016 16:21:31 +0000 (12:21 -0400)]
pimd: Allow ifchannel S,G's to know their *,G parent

Given a S,G ifchannel, create a parent pointer for any
*,G state for that interface.  When removing a *,G
remove S,G pointers.

We need to think about the case where their is a *,G
but no S,G for a interface when we are determing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: pim_str_sg_dump can't be called 2 times in the same debug
Donald Sharp [Thu, 28 Jul 2016 07:08:03 +0000 (03:08 -0400)]
pimd: pim_str_sg_dump can't be called 2 times in the same debug

When we call pim_str_sg_dump we cannot call the variable twice
for the same debug.  This fixes this issue in the 2 places it
was borked.

Ticket: CM-12045
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix *,g pruning
Donald Sharp [Thu, 28 Jul 2016 06:46:36 +0000 (02:46 -0400)]
pimd: Fix *,g pruning

We were not properly handling the receipt of prune *,g messages.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Infrastructure to forward packet down (*,G) tree
Donald Sharp [Thu, 28 Jul 2016 02:19:08 +0000 (22:19 -0400)]
pimd: Infrastructure to forward packet down (*,G) tree

When a register is received, forward the packet as appropriate.
This is the infrastructure to make this happen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Create raw socket for register packets to be forwarded.
Donald Sharp [Thu, 28 Jul 2016 01:17:54 +0000 (21:17 -0400)]
pimd: Create raw socket for register packets to be forwarded.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Create pim_socket_bind
Donald Sharp [Thu, 28 Jul 2016 00:13:16 +0000 (20:13 -0400)]
pimd: Create pim_socket_bind

Allow a socket to be bound to a specified
interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Revamp send of join/prune to actually set bits right.
Donald Sharp [Wed, 27 Jul 2016 20:33:41 +0000 (16:33 -0400)]
pimd: Revamp send of join/prune to actually set bits right.

When a *,G report is sent, the RPT and WC bits
are set as well as the source is the RP address
for the group.

If this routers idea of the RP for this group is
different than the idea of the RP from the sender
than that particular *,G can be dropped.

Ticket: CM-12031
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Start abstraction for WC and RPT bits
Donald Sharp [Wed, 27 Jul 2016 19:27:52 +0000 (15:27 -0400)]
pimd: Start abstraction for WC and RPT bits

Start the abstraction of the WC and RPT bits
so we can send the data as appropriate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fixup pim_oil interface to be a bit more consistent.
Donald Sharp [Wed, 27 Jul 2016 19:39:28 +0000 (15:39 -0400)]
pimd: Fixup pim_oil interface to be a bit more consistent.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Find the parent on newly created upstream's
Donald Sharp [Sun, 24 Jul 2016 05:15:09 +0000 (01:15 -0400)]
pimd:  Find the parent on newly created upstream's

When we create a new upstream data structure find the parent.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Make kernel upcalls PIM_DEBUG_MROUTE
Donald Sharp [Sat, 23 Jul 2016 23:54:51 +0000 (19:54 -0400)]
pimd: Make kernel upcalls PIM_DEBUG_MROUTE

The kernel upcalls for control messages should
be PIM_DEBUG_MROUTE instead of PIM_DEBUG_PIM_TRACE

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix Join/Prune logging
Donald Sharp [Sat, 23 Jul 2016 23:18:19 +0000 (19:18 -0400)]
pimd: Fix Join/Prune logging

For some reason Join/Prune debugs were being
turned on by trace not by the 'debug pim packets join'
command.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add some 'show debug pim' output
Donald Sharp [Wed, 27 Jul 2016 01:00:09 +0000 (21:00 -0400)]
pimd: Add some 'show debug pim' output

Add some missing 'show debug pim' output so that I can
see what I think I'm debugging.

In general the pim debugs need another round of fixing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Some bug fixes for the register receive code path
Donald Sharp [Sat, 23 Jul 2016 16:30:41 +0000 (12:30 -0400)]
pimd: Some bug fixes for the register receive code path

When we receive a register receive handle it a bit
better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Allow (*,G) joins to join a (s,g) that pre-exists
Donald Sharp [Sat, 23 Jul 2016 10:01:55 +0000 (06:01 -0400)]
pimd: Allow (*,G) joins to join a (s,g) that pre-exists

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add code to handle the inheritance for (s,g)
Donald Sharp [Sat, 23 Jul 2016 09:36:44 +0000 (05:36 -0400)]
pimd: Add code to handle the inheritance for (s,g)

Add code to handle the inheritance and to send the
join upstream as appropriate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove unnecessary QuaggaId
Donald Sharp [Sat, 23 Jul 2016 08:12:05 +0000 (04:12 -0400)]
pimd: Remove unnecessary QuaggaId

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: start fix of inherited_olist
Donald Sharp [Sat, 23 Jul 2016 07:47:15 +0000 (03:47 -0400)]
pimd: start fix of inherited_olist

We were not correctly determing the inherited olist and
applying it to the s,g.

Start the work to do this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Stop leaving pim_register_recv early
Donald Sharp [Sat, 23 Jul 2016 07:36:25 +0000 (03:36 -0400)]
pimd: Stop leaving pim_register_recv early

When we received a pim_register_recv we were shortcutting
the algorithm to determine what to do when we receive
a register pim message.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix _find and switch_to_spt_desired.
Donald Sharp [Sat, 23 Jul 2016 07:33:53 +0000 (03:33 -0400)]
pimd: Fix _find and switch_to_spt_desired.

The pim_upstream_find function should not be finding a *,G
Find what is asked of it.

The switch_to_spt_desired should return true on the RP currently.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: pim_br switch to struct prefix
Donald Sharp [Sat, 23 Jul 2016 04:35:35 +0000 (00:35 -0400)]
pimd: pim_br switch to struct prefix

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: SwitchToSptDesired now uses struct prefix *sg.
Donald Sharp [Sat, 23 Jul 2016 04:06:55 +0000 (00:06 -0400)]
pimd: SwitchToSptDesired now uses struct prefix *sg.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: More conversion of struct prefix *sg
Donald Sharp [Sat, 23 Jul 2016 03:58:55 +0000 (23:58 -0400)]
pimd: More conversion of struct prefix *sg

Some more conversion to use struct prefix *sg in pim_ifchannel.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Convert pim_ifchannel_local_membership_del to struct prefix *sg
Donald Sharp [Sat, 23 Jul 2016 03:50:29 +0000 (23:50 -0400)]
pimd: Convert pim_ifchannel_local_membership_del to struct prefix *sg

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: convert pim_ifchannel_local_membership_add to use struct prefix sg
Donald Sharp [Sat, 23 Jul 2016 03:42:11 +0000 (23:42 -0400)]
pimd: convert pim_ifchannel_local_membership_add to use struct prefix sg

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Convert pim_ifchannel_prune to use struct prefix *sg
Donald Sharp [Sat, 23 Jul 2016 03:34:27 +0000 (23:34 -0400)]
pimd: Convert pim_ifchannel_prune to use struct prefix *sg

Convert the pim_ifchannel_prune function to use a struct
prefix *sg for the source group.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Convert pim_ifchannel_join_add to struct prefix *sg
Donald Sharp [Sat, 23 Jul 2016 03:28:13 +0000 (23:28 -0400)]
pimd: Convert pim_ifchannel_join_add to struct prefix *sg

Convert the pim_ifchannel_join_add to use a struct prefix *sg
instead of struct in_addr's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: more source,group conversion to prefix sg
Donald Sharp [Sat, 23 Jul 2016 03:12:06 +0000 (23:12 -0400)]
pimd: more source,group conversion to prefix sg

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>
8 years agopimd: Refactor s,g information to struct prefix in pim_upstream.h
Donald Sharp [Fri, 22 Jul 2016 12:57:20 +0000 (08:57 -0400)]
pimd: Refactor s,g information to struct prefix in pim_upstream.h

This change allows us to pass the (s,g) state around as a prefix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Convert ifchannel to using a prefix to store (s,g)
Donald Sharp [Fri, 22 Jul 2016 12:01:43 +0000 (08:01 -0400)]
pimd: Convert ifchannel to using a prefix to store (s,g)

Convert ifchannel to use a prefix to store (s,g) information.
Additionally create pim_str_sg_dump function to output
data when using debugs.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Setup prefix.h to allow it to store (s,g)
Donald Sharp [Fri, 22 Jul 2016 09:58:08 +0000 (05:58 -0400)]
lib: Setup prefix.h to allow it to store (s,g)

We need the ability to store the (s,g) in a struct prefix.
This will allow us to consolidate some duplicated code in
pimd as well as set us up to switch from a link list to a
table to store (s,g) state.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix join in register to use correct nexthop
Donald Sharp [Fri, 22 Jul 2016 14:19:32 +0000 (10:19 -0400)]
pimd: Fix join in register to use correct nexthop

pim was sending the join from the RP towards the FHR with
a address that was the source instead of the nexthop.  This join
was treated as a non-local and nothing was done with it.

Ticket: CM-11945
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Start switchover to using a PRUNE (S,G) for uninteresting streams
Donald Sharp [Fri, 22 Jul 2016 13:26:30 +0000 (09:26 -0400)]
pimd: Start switchover to using a PRUNE (S,G) for uninteresting streams

When we receive a register for a (S,G) that we have no interest in
prune it off and send the register stop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: API to locate client structure based on protocol
vivek [Thu, 21 Jul 2016 15:50:17 +0000 (08:50 -0700)]
zebra: API to locate client structure based on protocol

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket:
Reviewed By: CCR-4968
Testing Done: Tested with subsequent patch(es)

8 years agopimd: Make pim_upstream_switch non static
Donald Sharp [Sat, 16 Jul 2016 12:27:24 +0000 (08:27 -0400)]
pimd: Make pim_upstream_switch non static

Allow pim_upstream_switch to be called from outside of pim_upstream.c
Also change the assert to an if test to just correctly stop the
timer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: change string to JOINPRUNE
Donald Sharp [Sat, 16 Jul 2016 12:23:22 +0000 (08:23 -0400)]
pimd: change string to JOINPRUNE

Change the JP message string to JOINPRUNE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Refactor pim message type to an enum
Donald Sharp [Sat, 16 Jul 2016 08:49:32 +0000 (04:49 -0400)]
pimd: Refactor pim message type to an enum

Change the pim message type to an enum and add the ability
to output a string based upon message type.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Use XCALLOC instead of XMALLOC
Donald Sharp [Sat, 16 Jul 2016 06:45:33 +0000 (02:45 -0400)]
pimd: Use XCALLOC instead of XMALLOC

Ensure that all data structures start out
as 0 filled.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix PACKETDUMP compile errors.
Donald Sharp [Fri, 15 Jul 2016 19:47:13 +0000 (15:47 -0400)]
pimd: Fix PACKETDUMP compile errors.

signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

8 years agopimd: First Schwag at pim_register_stop
Donald Sharp [Fri, 15 Jul 2016 19:42:09 +0000 (15:42 -0400)]
pimd: First Schwag at pim_register_stop

Implement the pim_register_stop state machine.  There are still a few
bugs still but this is enough to get us rolling a bit more.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Refactor ifchannel creation.
Donald Sharp [Fri, 15 Jul 2016 15:03:15 +0000 (11:03 -0400)]
pimd: Refactor ifchannel creation.

Remove unnecessary function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove unneeded function.
Donald Sharp [Fri, 15 Jul 2016 13:42:57 +0000 (09:42 -0400)]
pimd: Remove unneeded function.

Remove the prune_echo function as that it just took some
data and passed it into another function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Properly initialize and delete t_rs_timer
Donald Sharp [Mon, 18 Jul 2016 13:52:45 +0000 (09:52 -0400)]
pimd: Properly initialize and delete t_rs_timer

Ensure that we properly initialize and stop the t_rs_timer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Create register stop timer for DR
Donald Sharp [Mon, 18 Jul 2016 13:47:19 +0000 (09:47 -0400)]
pimd: Create register stop timer for DR

When a register stop is received, create the register stop
timer and associated state machine.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add null_register bit to pim_register_send
Donald Sharp [Mon, 18 Jul 2016 00:18:33 +0000 (20:18 -0400)]
pimd: Add null_register bit to pim_register_send

When sending a pim register message to an RP, we need
the ability to set the null bit in the message.  This
adds the ability to do so.

Additionally we need to switch the ip_hdr to a const uint8_t *buf
because pim_register_send really shouldn't know or care about
the fact it's a 'struct ip'.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>