Commit Graph

760 Commits

Author SHA1 Message Date
Donald Sharp
338988d9cd pimd: Track oil list totals a bit better.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02 08:12:57 -05:00
Russ White
54b19ceaf9 Merge pull request #224 from donaldsharp/pim_patches_feb
Pim patches feb
2017-03-01 09:52:24 -05:00
Donald Sharp
608a261b2c pimd: Fix use of value after free
Fix the usage of source after it has
been explicitly free'd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-01 08:36:09 -05:00
Donald Sharp
ce9531309c pimd: Get Static mroutes displaying again
The static mroutes were making the assumption that the vif index
and the ifindex were the same.  This is not necessarily the case.

Additionally if we are displaying a *,G route only display
the G.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:31:34 -05:00
Donald Sharp
79bdcd9974 pimd: Move group handling to it's own function for J/P message
When we are handling a J/P message, move the group handling
to it's own function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
6345a32671 pimd: Add hash lookup for igmp group's
When we receive a group in a IGMP report
let's look it up based upon a hash
instead of a list.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
b7ddd2ec48 pimd: Intelligently drop wrvifwhole packets in some cases
Suppose we have this

(*,G) IIF = swp1  OIL: swp3
(S,G) IIF = swp2  OIL: swp3 swp4

There exists situations where we can receive the mcast
packet for (S,G) on both swp1 and swp2.  In this case
the packet received on swp1 will be sent from the kernel
to us as a WRVIF and WRVIFWHOLE.

As per normal, WRVIF packet processing handles the assert
case so we know we have not received the packet on a downstream
interface, so no assert.

The WRVIFWHOLE packet processing can then check to see if
it received the packet as a result of the (*,G) mroute
from upstream.  If we have then we can safely drop
the packet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
b5e2377cca pimd: Refactor pim_joinprune_send
Refactor pim_joinprune_send to use 'struct rpf'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
42a0111b64 pimd: Refactor pim_rpf_update to take a 'struct pim_rpf'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
d270b2163e pimd: Refactor functions
Refactor the add and delete functions.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
a625e9373b pimd: Make ifchannel lookup a hash lookup
When we are at scale, it is possible that
we have a very large number of ifchannels
per interface.  So make lookup for
that situation to be a hash lookup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
4961e0ad8f pimd: Trust the compiler
When we set a variable to NULL, there is no
need to assert on it the following line.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
9f44d04202 pimd: Narrow inheritance search down to interface we are interested in.
When we are only looking at one ifchannel, for inheritance, narrow
the search down to only the interface/ifchannel we are interested in

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:41 -05:00
Donald Sharp
0ae2a75af4 pimd: Remove unnecessary igmp check
When we receive a igmp packet, there is no need
to ensure that it is a igmp packet, as that is
what we have asked for.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
b50fcf3aa8 pimd: Remove unnecessary ip header length checks on receipt.
The kernel will not hand us a malformed packet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
910dad7e99 pimd: Remove unnecessary check in packet process path
When we get a packet from the network for pim, we do not
need to check to see that it is a pim packet, since that
is what we've asked to receive.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
116b989af2 pimd: Only debug in the unusual case
When receiving a J/P packet, only check to see if we should
log when the J/P packet is not for us.

Very slight performance improvement additionally

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
c48a612c21 pimd: Remove unneeded parameter
pim_upstream_join_timer_decrease_to_t_override passed in
a `struct in_addr` that in all cases was part of the
upstream data structure that was passed in already.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
74ac496fcb pimd: Add packed data structures for building j/p messages
Switch pim over to using packed data structures for building
Join/Prune messages to be sent.

This is a pre-cursor to the ability to handle the ability
to aggregate Join/Prune messages together.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
f8e7d7992f pimd: Assume buffer size passed in is of sufficient size
For:
pim_msg_build_header
pim_msg_addr_encode_ipv4_ucast
pim_msg_addr_encode_ipv4_group
pim_msg_addr_encode_ipv4_source

Assume that the buffer size passed in is of sufficient size
already.  This is assured already because buffer sizes
are checked for minimum lengths for the entire packet
ahead of time.  So we are double checking.

Additionally at scale we will be calling these functions
a very very large number of times.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
70ce34ae66 pimd: Add 'struct pim_msg_header' packed data structure.
Add the 'struct pim_msg_header' and convert
all places that encoded/decoded the message header
to use it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
09778298e2 pimd: Document the J/P packet format a bit better.
Document the J/P packet format and ensure
that the smallest size packet that we
may send will actually fit.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
811ed42ae5 pimd: Convert sizes to #defines
Convert the const int size of the encoded
types to #defines so that they can be
used elsewhere.

Return Null instead of 0.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-24 10:03:40 -05:00
Donald Sharp
05ea5ceecf pimd: Allow IPDEFTTL to be used for omnios
The omnios OS has no IPDEFTTL defined.
Add the ability to handle it for this
one case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-14 16:19:16 -05:00
Chirag Shah
e81d9709ff pimd: ifdown sequnce stale report entry
Ticket: CM-14652
Testing Done: Tested via sending IGMP report and flap port and verified pim upstream and mroute, the entry is deleted. Run pim-smoke

Even after Report received port down event, IGMP entry alawys exists in upstream, mroute, kernel.
The entry exist because it was recreated after delete due missing check if group has no more source list,
    mode is exclude, last source address was * means (*, G) so do not trigger to create entry.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-14 15:54:29 -05:00
Chirag Shah
429a291bf0 pimd: mroute entries unresolved IIF issue
Ticket:CM-14056
Reviewed By:sharpd, CCR-5603
Testing Done: verified multiple ifdown/ifup event on submitter setup and dev setup with 2k s,g entries, ran pim-smoke.

1. during ifdown event, pim vif for bridge was not resetting vif_index to -1 due to errno received from
kernel during vif del sequence. It could be timing issue where kernel may have delete prior to pimd sending request.
For vif_del even kernel returns error, reset vif_index to -1 in pimd DB so next if up event VIF receives new vif_index
and reprograms in kernel.
2. during mroute del sequence reset mfcc_parent to MAXVIF.
3. during mroute add check if parent mfcc_parent is MAXVIF then do not download to kernel such mroute entry.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-02-14 15:53:34 -05:00
Chirag Shah
d62c5c0381 pimd: messages to neighbors should have TTL = 1
Ticket:CM-12924
Reviewed By:shapd
Testing Done: configure PIM neighbor, verify PIM hello packet dump for ttl to be 1.

Set TTL to 1 for outgoing multicast control packets destine to ALL-PIM-ROUTERS as oppose to unicast mcast packets.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-02-14 15:52:56 -05:00
Chirag Shah
5637da0501 pimd: non-null register checksum incorrect
Ticket: CM-12041
Reviewed By: sharpd, CCR-5556
Testing Done: Tested on Local setup generating PIM Register (Data/Null) and processing both Tx/Rx with correct checksum.
Provided quagga debian to submitter and checksum cases passed on submitter setup.

1. PIM Register msg checksum only accounts for 8 bytes (4 bytes for PIM header and next 4 byetes before data payload).
In PIM header checksum calculation checked PIM packet type (in this case REGISTER type) then only pass 8 bytes as length
rather than full packet length.
2. PIM Register Rx path also handled with 8 byte and full pim lenth checksum.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-02-14 15:52:09 -05:00
Chirag Shah
48f6dc2dae Fix PIM DBG message
Ticket: CM-13771
Reviewed By: CCR-5537
Testing Done: yes

Fix to CM-13771 where DBG message was out of order.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-02-14 15:51:09 -05:00
David Lamparter
dab8cd005f *: fix ambiguous commands
Some "show [ip] bgp ipv4 encap ..." commands remaining ambiguous.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-10 16:57:20 +01:00
David Lamparter
bae44e4b76 Merge branch 'frr/pull/186' (pimd register length)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-09 13:46:44 +01:00
Donald Sharp
6431763d95 pimd: Send proper length register packets
PIM Register packets are 20 bytes too long.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-08 09:46:43 -05:00
Donald Sharp
90d84f92ae pimd: Cleanup dest buffer to small
Cleanup the in_ifname and out_ifname buffers
to be large enough to hold the actual interface
names.

Additionally move the common variables to be defined
once, instead of inside of multiple for loops

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-07 15:08:56 -05:00
Donald Sharp
7df2e1c379 Merge remote-tracking branch 'origin/stable/2.0' 2017-02-07 13:20:12 -05:00
David Lamparter
f6864de1ab Merge branch 'frr/pull/165' ("Pim vrf")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-07 15:52:52 +01:00
David Lamparter
fa02c492fa Merge branch 'frr/pull/152' ("Lib fixes")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-07 15:48:46 +01:00
Donald Sharp
e5dfe68784 pimd: Refactor pim_sock_open to just need the ifp pointer
In all cases pim_sock_open was called, we just passed
in the pim_ifp->primary_address, which is accessible
from the interface pointer.  So just pass that in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-03 12:37:39 -05:00
Donald Sharp
b35702d0b8 pimd: Allow a interface in a vrf to be configured.
This fixes the issue a crash when we have configured an interface
inside of a vrf, and apply pim commands to it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-03 12:33:37 -05:00
Donald Sharp
55c7280315 *: Convert libzebra -> libfrr
The library libzebra that is installed with FRR will
conflict with Quagga.  So let's rename it to libfrr.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-03 08:29:13 -05:00
Donald Sharp
1a35e2e565 Merge remote-tracking branch 'origin/stable/2.0' 2017-02-02 10:42:51 -05:00
Donald Sharp
540263204c pimd: Fix fd leak
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-01 20:44:21 -05:00
Donald Sharp
28d5da5a53 pimd: Fix cmd issues
Fix possible buffer overwrite and uninitialized idx access.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-01 20:40:10 -05:00
Donald Sharp
35661ffa0c pimd: Fix broken switch statement
Fix broken switch statement that would
allow the case statement to fall through.

Fix possible buffer overwrite.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-02-01 20:38:02 -05:00
David Lamparter
ff1c42fb9f *: fix warning fallout from set_socket_path
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-02-01 13:12:16 +01:00
David Lamparter
26df3a33ae Merge branch 'frr/pull/133' ("Pim cleanup")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-01-31 15:26:07 +01:00
Donald Sharp
a118e71d0e pimd: Fix handling of *,G on RP to allow prune of S,G to go out
When on the RP we received a prune *,G for an established S,G
If join_desired is no longer true we need to prune and
reset some timers, in addition to removing the inherited
interface from the olist.

This was not happening because we were just removing
the inherited oif from the *,G.

Ticket: CM-14561
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 12:54:20 -05:00
Donald Sharp
0b6817c5e7 pimd: Cleanup shutdown a bit more.
Cleanup the shutdown of pim a bit more.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 12:53:47 -05:00
Donald Sharp
98573e196c pimd: Cleanup uninitialized memory access
Valgrind noticed that we have a read of uninitialized memory:

Conditional jump or move depends on uninitialised value(s)
==13749==    at 0x428067: pim_ifassert_winner_set (pim_assert.c:57)
==13749==    by 0x4266F0: pim_ifchannel_add (pim_ifchannel.c:535)
==13749==    by 0x426CC1: pim_ifchannel_join_add (pim_ifchannel.c:730)
==13749==    by 0x427B5B: recv_join (pim_join.c:95)
==13749==    by 0x427B5B: pim_joinprune_recv (pim_join.c:270)
==13749==    by 0x42354F: pim_pim_packet (pim_pim.c:249)
==13749==    by 0x4236C0: pim_sock_read (pim_pim.c:349)
==13749==    by 0x4E60587: thread_call (thread.c:1462)
==13749==    by 0x40C75E: main (pim_main.c:266)
==13749==

This commit fixes that issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 12:53:27 -05:00
Donald Sharp
e34a317acf pimd: Modify pimreg creation
We were creating the pimreg device with a
created ifindex of 255.  This was causing
issues when a interface was assigned a ifindex
of 255 by the kernel.  Subsuquently pim
would stay in a hosed up state.

Modify the ifindex used for the pimreg device
to be 0.

Ticket: CM-14625
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 12:52:06 -05:00
Donald Sharp
f663aa7ad4 pimd: Use correct flag to add an oif
When we are creating the igmp ifchannel we were creating
it with both a P and a I flag.  This was causing
it to not be cleaned up properly when the interface
was shut down.  Subsuquently when the interface
came back up we would attempt to add it back in
but it would fail.

Ticket: CM-14586
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 12:51:45 -05:00
Donald Sharp
dc0665f150 pimd: Handle assignment of vif index better
PIM was handling vif creation deletion poorly
for interface down and up events.  Fix this
issue by keeping track of which vif index'es
we have issued and allow the wholes to be
filled in.

Ticket: CM-14556
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 12:51:20 -05:00
Donald Sharp
781a1745c0 pimd: Fixup tracking of where we got OIF's from.
This commit does these three things:

1) Add code to 'show ip pim state' to show where OIF's got their
decision to include that interface

2) Add code in pim_mroute_[add|del] to display what we think we are
adding to the kernel

3) Add code to properly track where we got the incoming request from and
to appropriately not remove a OIL if we have state still

Ticket: CM-14034
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-01-30 12:49:38 -05:00
Donald Sharp
38f4935a5d pimd: Move qpim_zclient_update -> zclient
Rename the qpim_zclient_update variable to zclient.
This is to follow the naming conventions in the rest
of the code.

Additionally move the struct zclient * pointer into pim_zebra.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 10:19:25 -05:00
Donald Sharp
8799b66b94 pimd: Start abstraction of zclient data structure for pim_zebra.c
Start the abstraction of the zclient data structure out from a
global variable for the entire program to a global variable
to the pim_zebra.c file.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 10:04:05 -05:00
Donald Sharp
59d4564e0f pimd: Remove Double call of routemap_teriminate
"He's dead, Jim"

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-30 07:47:21 -05:00
Donald Sharp
72e81cf424 pimd: More pim cli fixup
Found some additional issues with the pim
cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-26 09:10:54 -05:00
Martin Winter
a8cdea56f4 pimd: Add vty_socket cli option to override the compiled-in location for the VTY Socket
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-01-26 00:41:46 +07:00
Martin Winter
780cff2f08 pimd: Add missing 'socket' getopt cmdline option
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-01-26 00:40:32 +07:00
Donald Sharp
a957a05bb4 pimd: Cleanup some missing help strings.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-25 09:13:46 -05:00
Donald Sharp
c74e219474 pimd: Fix double add of command
We were adding the 'ip msdp ...' command to
the parser 2x.  Some new code added to the
parser apparently catches this for us now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-25 08:20:06 -05:00
Donald Sharp
83190a40e2 pimd: Cleanup the headers.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-19 10:01:02 -05:00
Donald Sharp
77b7d90beb pimd: PIM_MRT is a linux specific piece of code.
The PIM_MRT and registration for WRVIFWHOLECACHE
is a bit of linux specific code.  Until such
time that this gets implemented we will have
issues being able to work within the context
of PIM-SM.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-19 09:58:53 -05:00
Donald Sharp
3629c61d11 pimd: Fix README file for FRR
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-19 08:57:17 -05:00
Donald Sharp
7a6e656788 pimd: Cleanup compile warnings
Cleanup some compile warnings in pim on *bsd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-19 08:49:47 -05:00
Donald Sharp
fcd6282c55 pimd: Missing include causes compile failure on some bsd's
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-19 08:49:12 -05:00
Donald Sharp
5fe80c1a8f pimd: Fix compilation error
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
2017-01-18 07:50:19 -05:00
Donald Sharp
de6d2fa72e pimd: Remove bad merges
Two functions were accidentally left around
as part of the merge operation.  Remove them.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-18 07:47:58 -05:00
Donald Sharp
c2403b2598 pimd: 'struct ip_mreqn' is not available on all platforms
Signed-off-by: Donald Sharp <sharpd@cumulusnetowrks.com>
2017-01-18 07:24:24 -05:00
Donald Sharp
f15bf55387 pimd: SO_BINDTODEVICE is not available on some platforms.
Follow bgp's lead and don't allow SO_BINDTODEVICE on *bsd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-17 22:45:19 -05:00
Donald Sharp
b58ed1f8a8 Merge remote-tracking branch 'origin/master' into pim_lib_work2 2017-01-17 21:01:56 -05:00
Olivier Dugeon
b98f56422e Merge pull request #55 from donaldsharp/monotonic
Monotonic
2017-01-09 15:26:16 +01:00
Donald Sharp
37335ee22a pimd: Remove knowledge of HAVE_CLOCK_MONOTONIC
thread.c fails to build if we do not have CLOCK_MONOTONIC
no need to have pim have any knowledge of it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-01-07 19:21:21 -05:00
Donald Sharp
3b14d86eed Merge remote-tracking branch 'origin/stable/2.0' 2017-01-06 09:58:21 -05:00
anuradhak
01cb146642 pimd: make the json output a bit more machine-friendly
Mixing well-known and variable property names makes the output difficult
to parse. so wrapped variable-keyed dicts with well-known property
names (such as "oil") in the following outputs -
"show ip mroute json"
"show ip msdp mesh-group json"

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-12-21 20:26:19 -05:00
Donald Sharp
28185336ed pimd: Fix core when bouncing interfaces
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>
2016-12-21 20:26:19 -05:00
Donald Sharp
693c9259df pimd: Fix cleanup crash
When shutting down, actually delete the right data
structures.

Stupid cut-n-paste error on my part.

Ticket: CM-14018
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:19 -05:00
Donald Sharp
bfdf409644 pimd: Allow us to repair missed inherited_olists
There exists situations where we have noted that
we need to rescan but have missed the window
of opportunity to actually redo the scan
so for the moment allow the S,G 30 second
scanner notice the missed opportunity and
fix it.  We'll remove this later.

Ticket: CM-13988
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:19 -05:00
Donald Sharp
fa8489cb5c pimd: Don't send (S,G)RPT prune
Sending (S,G)RPT prune was causing issues due to not handling
it properly at this point in time.  So just don't send it right now

Ticket: CM-13969
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:19 -05:00
Donald Sharp
38f380f56d pimd: Fix crash w/ ifp null in pim_mroute.c
When you do a series of ifdown/ifup for
an interface that is receiving packets
through the kernel pim socket, it is
possible that the interface has been
deleted but the kernel is still going
to deliver us a packet.  In that case
do not allow us to crash.

Ticket: CM-13981
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:19 -05:00
Donald Sharp
ef71d1f860 pimd: Allow bridges and bonds to up and down
Bridges and bonds when ifdowned are removed from
the kernel in it's entirety, while pim assumed
that interfaces were kept around in some fashion.

Basically when we had an ifdown event, for all ifchannels
on that interface delete from the OIF.  Also note
the fact that the vif has gone away and we need to
recreate it on the next ifup.

Ticket: CM-13896
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:19 -05:00
Donald Sharp
b5183fd1ae pimd: Tell ourselves to rescan when we discover an issue
When we have network churn and we have an inherited_olist
notice when we may have a situation where we need
to recalculate the inherited_olist.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:19 -05:00
Donald Sharp
be5770d770 pimd: Remove unused zclient_debug variable
Remove code that sets the pim_zclient_debug variable
but is never used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:19 -05:00
Donald Sharp
5a515ebed0 pimd: Reset neighbor hold time when we receive packet
When we receive a packet from a neighbor, reset the
hold time as that we *know* that they are still
alive.

During heavy packet load, we were seeing cases
where neighbors were being reset because we
were timing out due to not processing the hello
packet in time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
a85d880293 pimd: Rework zassert code in pim_assert.c
When we encounter an error in the state machine
for an individual ifchannel, do not bring the entirety
of the pim daemon down.  Notice the issue and continue
on.

Ticket-CM-13939
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
67f771b3a3 pimd: Add guard for pim_msg_send_frame
In certain error conditions it is possible to
attempt to send packets when the socket is not ready
instead of dumping to the log a million error messages
only note the issue if we have packet debugs on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
07335c8d08 pimd: Modify pim_upstream_new behavior
Modify pim_usptream_new to auto create the pim
channel oil.  Why?  Because there exists situations
where we have upstream state and we are attempting
to set the inherited_olist on it and we have
not created the channel oil yet.  When that
happens we end up with mroutes that are
being meanies.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
ee1a071806 pimd: Add ability to tweak join/prune send time
Add the ability to tweak how often we can
send the join prune message.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
8d90ffd05d pimd: Correctly associate channel oil with correct IIF
There exists situations where PIM stores a S,G channel oil
and doesn't delete it.  When a new upstream comes in for
it we were not ensuring that the IIF for the S,G channel oil
was correct.

Ticket: CM-13908
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
6a78764e46 pimd: Clarify pim_mroute_[add|del] function debugging
When debugging is turned on for 'debug mroute' we
are unable to tell when a mroute has been added
or deleted from the mrib.  Notice when we
do it and who called it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
eeedae06ee pimd: Cleanup debugs for pim_upstream_sg_running
In the normal case when we have debugs turned on and the
stream is not running, only display one line of output
instead of 2.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
3197cb1eb5 pimd: Cleanup some more debugs
Cleanup some pim debugs:

1) For some reason some PIM_DEBUG_PIM_TRACE were not showing up
switched them to PIM_DEBUG_TRACE

2) Some mroute debugs were a bit redundant.  Reduce.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
4bbcefe91f pimd: Cleanup debugs on 2016-12-21 20:26:18 -05:00
Donald Sharp
6578dfa378 pimd: Fix where we handle the inherited_olist for ifchannel
When we receive a new *,G ifchannel, handle the inherited_olist
for S,G mroutes in a place where it is more appropriate.

Ticket: CM-13892
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
70e7fda8a4 pimd: Stop sending Register under certain situations
When the switch in question is both a FHR and the RP
for the received multicast group stream.  When we go
to send the NULL register to the RP( ourselves )
do not send it if we have not seen packets for
that stream in time greater than PIM_KEEPALIVE_PERIOD
and I_am_RP(G).

Ticket: CM-13880
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
anuradhak
833331fbce pimd: increase the maximum msdp TLV burst to 100 from 12
12 is too slow of a slow-start in scale setup (say with 6000 SAs)
when sources are being learnt one at a time (but in a rapid fire
fashion).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
anuradhak
3e5e42252e pimd: reset packet size on tcp connection reset
If we were in the middle of a partial read when the tcp connection is
reset we were clearing the buffers but not the packet size. This can be
problematic when the connection is re-established.

There is no easy way to repro and test this without scale (and a timing
pattern that is hard to predict). So this change is mostly untested.

Ticket: CM-13852
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
anuradhak
489e06bbcf pimd: Add debug logs to help find problems with stream_read
Logs only. No functional change
Ticket: CM-13852

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
06d1c450f3 pimd: With igmpv2 turned on don't accept 224.0.0.0/24 groups
When a group is in the 224.0.0.0/24 range and we
have igmp v2 turned on do not allow it to be
considered for inclusion as a mroute.

Ticket: CM-13855
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
2016-12-21 20:26:18 -05:00
Donald Sharp
f041117e84 pimd: Fix 'no ip igmp query-max-response-time XX' to work
Ticket:CM-13786
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
1e3a513213 pimd: Modify the Prune Pending Timer Pop to not assert
So there exist conditions where we can start the Prune
Pending Timer and receive other packets that cause
us to not stop the pending timer.  This was
due to a missread of the state machine.

Additionally when the prune pending timer pops and
we are not in prune pending state, note the fact
and move on with our life instead of crashing and burning

Ticket: CM-13851
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
2016-12-21 20:26:18 -05:00
anuradhak
36e466fe98 pimd: Drop local SA reference when the upstream SG is deleted
This is done irrespective of the reason for del and is intended as a
catchall for cases (unclear which ones) where the RP can drop the SG
without KAT expiry.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
1319c91f3b pimd: Fix so creation of prefix happens one time
Fix code so that the creation of the 224 prefix happens
one time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:18 -05:00
Donald Sharp
b815998a42 pimd: Don't allow invalid groups to be passed for igmp
When we receive a invalid group( say outside of the 224/4
range) don't allow it to create state.  Nicely reject
the rejectable.

Ticket: CM-13821
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
anuradhak
69053fb4f0 pimd: restart the ka timer after the sa adv timer
To avoid unnecessary ka activity in the network. When the SA
advertisment timer fires we build SA TLVs and send them to peers. As a
part of this tx we were also restarting the ka timer to avoid
unnecessary ka generation in the next 60 seconds. However because the
adv timer was restarted after tx (i.e. after ka restart) ka timer would
always endup firing just before the adv timer.
2016-12-21 20:26:17 -05:00
anuradhak
c024cfacea pimd: Fix the number of SAs pushed into one MSDP SA-TLV
The entry_cnt in a SA TLV is one byte. I was trying to push 765 SAs into
each TLV resulting in strange problems in a scale setup.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
d52ff9b703 pimd: Do not allow deletion of output interface.
There exists conditions where PIM will have it's
upstream route removed and an unreachable route
is installed that points out the downstream
interface.  This unreachable route is removed
from bgp as soon as it's path selection algorithim
works properly, but pim has already deleted
the oif and never puts it back in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
a23ee35b2b pimd: Fix show run output to be correct.
When issuing a vtysh -m command it expects the
output it receives to be the complete command
not a partial match.

The 'debug pim packets joins' command
was being outputted as 'debug pim packets join'

This was making quagga-reload.py unhappy.  Adding
the joins word allows it to complete successfully

Ticket: CM-13805
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
cf3cd99f5d pimd: Lower Hello sent to be immediate
There exists situations where an interface flaps
and routing recovers and we attempt to install
an upstream but since we have no neighbor out
that interface still.  Let's cause the hello
to go out immediately for the 3.1 release
to allow mrouting to recover in this situation.

We will need to revisit this issue after
we have proper nexthop tracking in place

Ticket: CM-13185
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
5e9985887e pimd: Fix pim_oil_equal function
We are self testing for c2 being equal to c2.

Bad Donald!  No Donut!

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
80df099b48 pimd: Fix stupidity compile errors
I introduced compile errors using gcc, that worked fine
with clang.

This removes the issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
58344b652e pimd: Make igmp query max response time take input in dsec
Make the 'ip igmp query-max-response-time' command
take input in deci-seconds and make the
'ip igmp query-max-response-time-dsec' command hidden.

Ticket:CM-13786
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
802b226c8d pimd: Cleanup nexthop debugging
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>
2016-12-21 20:26:17 -05:00
Donald Sharp
da3dcffb66 pimd: Add more RP rescan points
When we add in or delete ip addresses from an interface
we may need to rescan the rp's that we know of to make
sure that they are still available.

Ticket: CM-12623
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
a04da05a53 pimd: Only check to see if current rp is 'right' or not.
When a new rp is entered, pim is looking at all rp's and failing the check if
any of the RP's have no path to the RP, instead of the one that was
just entered being wrong.

Ticket: CM-12623
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
44521e5d2d pimd: When specifying 224.0.0.0/4 as the RP group inform msdp
When we modify the 224.0.0.0/4 rp address with a:
'ip pim rp A.B.C.D'

We need to let msdp know that this command was entered.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
86abfcb897 pimd: Actually expedite a hello
When we get a new neighbor for an interface, we need
to send a hello out that interface in some situations.
At this time we were tracking this by the pim_ifstat_hello_sent
value but not reseting it when we received a new neighbor.

Ticket: CM-13769
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
anuradhak
7cdb24da72 pim-anycast-rp: Change the reason code on use-source config failure.
Was failing with a vague error -
"Source set failed"

Changed to used the error string (used by the rest of the commands) -
"Pim not enabled on this interface"

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
anuradhak
b9b1e1f2ba pim-msdp: Fix pimd crash on mesh-group delete.
The mesh group contents were being accessed after memory was freed.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
anuradhak
da72c9fdc3 pim-nexthop: mroute and pim-upstream rpf are falling out of sync.
Currently the mroute-IIF and upstream RPF-IIF/neigh are resolved separately.
This must change i.e. be merged together for a couple of reasons -
1. In the case of ECMP we will use a load-share mechanism (based on G or
SG) to pick an RPF neighbor in 3.2.1 (to use the load-sharing cap of
anycast-RP). Using a different resolution mechanism for mroute-IIF will
simply not work.
2. In a non-CLOS topology it is actually possible to have routers that
do not participate in PIM. In this case the tree will be set up using
different routers than the ones chosen for the mroute IIF. And traffic
will not be forwarded.

This change is however too big for 3.2.0. So to handle CM-13714 I have
simply forced rpf update on neigh add which fixes the specific problem
seen on link flap in a clos (it is not very efficient but traffic
recovers).
In problem state -
(jessie-30-dev-switch-amd64-sbuild)root@spine-1:/home/cumulus# ip mr
(0.0.0.0, 225.1.1.1)             Iif: lo         Oifs: swp3 lo
(20.0.11.253, 225.1.1.1)         Iif: swp1       Oifs: swp3
(jessie-30-dev-switch-amd64-sbuild)root@spine-1:/home/cumulus# vtysh -c
"show ip pim upstream"
Iif       Source          Group           State       Uptime   JoinTimer
RSTimer   KATimer   RefCnt
lo        *               225.1.1.1       Joined      00:08:44 00:00:15
--:--:--  --:--:--       1
swp2      20.0.11.253     225.1.1.1       Joined      00:08:35 00:00:56
--:--:--  00:02:59       1
(jessie-30-dev-switch-amd64-sbuild)root@spine-1:/home/cumulus#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
Donald Sharp
a770ef9063 pimd: Remove redundant logging
When receiving a JOIN/PRUNE message if we have trace
turned on we output this:

2016/11/28 17:11:46.368827 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.13,103
2016/11/28 17:11:46.368956 PIM: Recv PIM JOINPRUNE packet from 169.254.0.6 to 224.0.0.13 on swp31s1: ttl=255 pim_version=2 pim_msg_size=34 checksum=e623
2016/11/28 17:11:46.369003 PIM: pim_joinprune_recv: from 169.254.0.6 on swp31s1
2016/11/28 17:11:46.369053 PIM: recv_prune: prune (S,G)=(20.0.11.253,229.1.2.3) rpt=0 wc=0 upstream=169.254.0.5 holdtime=210 from 169.254.0.6 on swp31s1
2016/11/28 17:11:46.369099 PIM: nonlocal_upstream: recv prune (S,G)=(20.0.11.253,229.1.2.3) to local upstream=169.254.0.5 on swp31s1

Clean up the messaging to this:

2016/11/28 17:11:46.368956 PIM: Recv PIM JOINPRUNE packet from 169.254.0.6 to 224.0.0.13 on swp31s1: ttl=255 pim_version=2 pim_msg_size=34 checksum=e623
2016/11/28 17:11:46.369053 PIM: recv_prune: prune (S,G)=(20.0.11.253,229.1.2.3) rpt=0 wc=0 upstream=169.254.0.5 holdtime=210 from 169.254.0.6 on swp31s1

Ticket: CM-13752
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
anuradhak
58c51da212 pim-nexthop: set the correct nexthop address in the rpf info.
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>
2016-12-21 20:26:17 -05:00
anuradhak
11b7753a89 pim-msdp: Update the RP address in the SA cache entry on peer ip change
The RP address in the SA is only for informational/display purposes. It
is still confusing if we show a stale value.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
anuradhak
886d1e80f6 pim-msdp: cleanup debug commands
And fixup display spacing. No functional change.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:17 -05:00
anuradhak
15ad0c71e0 pim-msdp: CLI and debug cleanup
No functional change.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
7923d3178f pimd: Cleanup igmp read socket
With the change over to using the kernel upcall for igmp messages,
we need to add in a read thread for the igmp socket to drain
the igmp socket's receive queue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
anuradhak
4763cd0ed5 pim-anycast-rp: Support in BGP unnumbered networks.
Anycast rp requires multiple ip addresses on the lo. If PIM is used in
an unnumbered BGP network it picks one of the lo addresses as the
pim-primary for the swp interfaces. But if the anycast IP is picked up
by both sides pim nbr will never converge. So a static "use-source" config
is provided to allow the administrator to force the the hello source to the
unique IP address.

Sample output:
=============
dell-s6000-04(config-if)# do show running-config pimd
>>>>>> SNIPPED >>>>>>>>>>>>>>>>>
interface lo
 ip pim sm
 ip pim use-source 100.1.1.5
!
>>>>>> SNIPPED >>>>>>>>>>>>>>>>>
dell-s6000-04(config-if)# do show ip pim interface lo
Interface  : lo
State      : up
Use Source : 100.1.1.5
Address    : 100.1.1.5 (primary)
             100.1.1.100
>>>>>> SNIPPED >>>>>>>>>>>>>>>>>
dell-s6000-04(config-if)# do show ip pim interface lo json
{
  "lo":{
    "name":"lo",
    "state":"up",
    "address":"100.1.1.5",
    "index":1,
    "lanDelayEnabled":true,
    "useSource":"100.1.1.5",
    "secondaryAddressList":[
      "100.1.1.100"
    ],
>>>>>> SNIPPED >>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
18e565fd96 pimd: Only make the pim sockets non blocking.
Only make the pim sockets non-blocking on reads.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
8e4c9ef376 pimd: Add knob to control # of packets read in at one time
Add 'ip pim packets <1-100>' command.

Allows you to control the number of packets read in before
giving control back to another part of the process.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
anuradhak
7176984f74 pim-anycast-rp: Add limited support for secondary addresses.
Anycast requires that the lo interface be associated with multiple
addresses. One is the anycast IP address (which is the same on all RPs
participating in RP redundancy) and the second is the unique IP address
that will be used as the router id by routing protocols.

To accomodate that we maintain a list of secondary addresses per-pim iface
and allow any of them to be the RP address. This lets the I_am_RP macro
succeed on anycast RPs.

Note that the support is limited i.e. we don't actually advertise a
secondary list to the neighbors. This is assuming the anycast IP will never
be used as a router id i.e. will never be an RPF neighbor.

Sample output:
==============
dell-s6000-04# sh ip pim interface lo
Interface : lo
State     : up
Address   : 100.1.1.1 (primary)
            100.1.1.2
            100.1.1.3
            100.1.2.1
>>>>>>> SNIP >>>>>>>>>>>>>>>
dell-s6000-04# sh ip pim interface lo json
{
  "lo":{
    "name":"lo",
    "state":"up",
    "address":"100.1.1.1",
    "index":1,
    "lanDelayEnabled":true,
    "secondaryAddressList":[
      "100.1.1.2",
      "100.1.1.3",
      "100.1.2.1"
    ],
>>>>>>> SNIP >>>>>>>>>>>>>>>
dell-s6000-04#sh ip pim rp-info
RP address       group/prefix-list   OIF         I am RP
100.1.2.1        224.0.0.0/4         lo          yes
dell-s6000-04#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
55a645a636 pimd: Set pim socket receive buffer to a larger value
There exists situations where we can receive data
faster than we can process it.  Make the buffer
large enough to catch these situations for
the pim sockets.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
6806e04d04 pimd: Modify mroute_read to be non-blocking
Modify mroute_read to be non-blocking and
then to read in up to 3 packets at a time
to be handled.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
db48bcb23e pimd: Modify pim_sock_read to read 3 times before yielding
Modify pim_sock_read to read up to 3 packets before yielding
the cpu to something else.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
5441e69048 pimd: Reduce duplicate debug messages in wrvifwhole
When we get a wrong vif whole callback, reduce
the duplicate debug messages being processed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
0f055c0d5d pimd: Further refine debugs in pim_sock_read path
When we received a packet we were dumping packet information
with debugs on 2 times for each packet where we had overlapping
data being passed.

Since debugs are expensive, reduce the count to 1.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
8bfb8b67ae pimd: Allow storing of sg in string format
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>
2016-12-21 20:26:16 -05:00
Donald Sharp
9d8b5695fe pimd: Cleanup handling of pim_sock_read
Cleanup some turned on debug code that is no longer
needed to be turned on in the pim_sock_read
code path.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
70989c7c20 pimd: Modify wait time for response from Null Register
Give ourselves a few more seconds to wait for a response
for a NULL Register.  This will benefit us under heavy
mroute churn on the RP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
anuradhak
1bf1644338 pim-kat: changed kat handling to match rfc-4601 more closely.
1. This is needed to layout the MSDP macros for determining what SAs are
originated by a MSDP speaker.
2. We no longer let the kat timer expire on an active flow. Activity
counters/lastuse is polled via a wheel for every SG entry. If new
activity is detected the keepalive timer is started and SPT bit set.
A SRC_STREAM reference is also created for the entry if one doesn't
already exist.
3. If KAT actually expires it means the flow is no longer active. At
this point we stop advertising the SA to MSDP peers. We also pull
the SRC_STREAM reference (deleting the entry if there are no other
references).

PS: Checking counters on KAT expiry will come in the next change.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
2ecd52cd35 pimd: Remove dead code from pim_register.c
Remove the dead test code from pim_register.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
0e3b3d5d10 pimd: Add appropriate (S,G) debugs for register
When we send a register record the S,G if debugs are turned on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
4f7c4a76d8 pimd: Increase kernel socket rcvbuf size.
We are receiving notifications from the linux
kernel that we are filling up the receive buffer
for upcalls into pimd.  Let's increase the size
to something a bit bigger.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
191f5695df pimd: Add 'ip pim register-suppress-time <5-60000>'
Add the 'ip pim register-suppress-time ...' command.
Remove the 'no ip pim rp keep-al...' command as
that the register suppress set that value.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
7a90f85c1a pimd: Move pim_mroute.c global data to file local static
Move the qpim_mroute_socket_reader thread to pim_mroute.c
and make it static to the file.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:16 -05:00
Donald Sharp
def1e80732 pimd: Protect log messages with debug in pim_pim.c
Protect the log messages in pim_pim.c with PIM_DEBUG_PIM_PACKETS

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Daniel Walton
5f9cf1d209 pimd: 'show ip pim rp-info json' should use JSON_C_TO_STRING_PRETTY
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
980e939362 pimd: Use NULL to signify NULL pointer
Use the NULL c symbol to signify that we are
intentionally setting the pointer to NULL
instead of 0.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
e30a4d4afe pimd: Allow 'ip pim rp ...' config after bringup
If you specified the 'ip pim rp ...' after the
system has been configured it was not accepting
the new rp.  This fixes that issue.

Ticket:CM-12623
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
c83778f769 pimd: Allow 'no ip pim sm' to not turn off igmp
When we receive a 'no ip pim sm' for an interface
that has both pim and igmp on it, only turn
off pim.

Ticket: CM-12985
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
3440bd1573 pimd: Fix crash in pim_rp_show_information
When a 'show ip pim rp-info' is issued shortly
after a restart/start, pim will crash because
nexthop information has not been fully resolved
and the outgoing interface is NULL.

Ticket: CM-13567
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
anuradhak
977d71cc7a pim-msdp: part-4: cli cleanup
1. Add support for mesh-group based configuration that is easy to apply
via automation. The older per-peer configuartion is temporarily hidden
and will be cleaned up later.
Sample config -
ip msdp mesh-group cumulus source 100.1.1.4
ip msdp mesh-group cumulus member 100.1.1.5
ip msdp mesh-group cumulus member 100.1.1.6

2. Added support for detail peer and sa-cache displays. Along with
filter keys.

3. Add json output for all the msdp displays.

With this commit basic support for anycast-RP with MSDP (in numbered
network is complete). Unnumbered support will be added separately.

Ticket: CM-13306

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
5cd11e3cd0 pimd: Backing up broken state.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
27bc3ae3d4 pimd: Removing impossible code
We've already allocated the mp data structure
and am using hash_alloc_intern for the hash_get
function.  This will return the passed
in data structure.  There is no possibility
of mp being NULL.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
deab75f73a pimd: Reduce pim oil scan timer to 50ms
We need to react to route changes/Interface up/down events
faster in PIM.  Reduce the timer down to 50ms.

Ticket:CM-13549
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
0490c22d20 pimd: Start handling of wrong interface for (*,G)
When we get a callback for a specific (S,G) and
we have no ifchannel for it, see if we have a
(*,G) channel and handle it appropriately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
anuradhak
7667c5568f pim-msdp: part-3: use SA cache for setting up SPTs
1. Added a new MSDP source reference flag for creating (S,G) entries
based on the SA-cache. The RFC recommends treating as SA like rxing
a (S, G) join (which is a bit different then treating like a traffic
stream).
2. SA-SPT is only setup if we are RP for the group and a corresponding
(*,G) exists with a non-empty OIL.
3. When an SA is moved we need to let the SPT live if it is active (this
change will come in a subsequent CL).

Testing done:
1. SA first; SPT setup whenever (*, G) comes around.
2. (*, G) first. As soon as SA is added SPT is setup.
3. (*, G) del with valid SA entries around.

Ticket: CM-13306

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
46c8aab88a pimd: Add (-) PRUNE(S,G,rpt) from interface determination.
When determining the inherited_olist(S,G) add
the determination that we have received a
prune(S,G,rpt) from a neighbor.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
f21597f04d pimd: Fix the test to see if a upstream is (S,G,rpt)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:15 -05:00
Donald Sharp
1405c852fc pimd: Add code to handle pim prune(S,G) with sptbit
Add some more code to handle the prune(S,G) with the
sptbit set.  Turns this ifchannel into a (S,G,rpt).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
ce0ddb4e79 pimd: Write pim_upstream_empty_inherited_olist
A empty inherited_olist implies that we have
no outgoing interfaces.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
b72f79a92b pimd: Fix possible crash when leaving a channel
When leaving a channel, there exists a possibility
that we have not created the channel oil yet.
Ensure that we have channel oil before dereferencing

Ticket: CM-13522
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
b76d6e718e pimd: Modify downstream JP state to take into account all states
When we make a decision about downstream state let's
take into account all states.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
7f8b8a9af6 pimd: Remove unnecessary asserts
When we handle the thread arguments,
there is no need to assert.  As that
if they are wrong, we are going down
shortly anyways.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
220d8a49e6 pimd: Add Handler for Receive (*,G) join for (S,G,rpt)
According to Figure 5( Downstream per-interface (S,G,rpt)
state when we receive a (*,G) we need to move (S,G,rpt)
children of the (*,G) into different states.  This
implements that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
53e39e140d pimd: Ensure 'struct prefix sg' is inited in right order
When we called pim_parse_addr_group, don't reinitialize
the 'struct prefix_sg' *after* we've parsed the group.

Ensure in other places that we do this work, we initialize
prior as well.

Ticket: CM-13510
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
5349cf9a09 pimd: Fix 'show ip pim join json' output
When we have multiple incoming joins for
a single group on a interface, we need to
allow proper output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
637a61fa2b pimd: Add ability to know if ifchannel is (S,G,rpt)
Add ability to track (S,G,rpt) ifchannel prunes.
Add ability to display this data in json.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
11757d7b98 pimd: 'show ip pim join json' add by src not grp
If you add to the json by grp, if you have multiple
ifchannels for that group, on the the first one will
be displayed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
45b0c8f3cf pimd: Don't delete ifchannel if expiry timer is still running.
Don't delete the ifchannel if the expiry timer is still running.
We might need to add the prune pending timer as well?  Not sure

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
cf4ea1c4e5 pimd: use 'struct prefix_sg' for recv_join and _prune
When we read in the S,G from the join/prune message,
convert it into a 'struct prefix_sg' at an
earlier point in time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
a7762e0765 pimd: Modify pim_parse_addr_source to use 'struct prefix_sg'
Modify the pim_parse_addr_source function to take
a 'struct prefix_sg' and to fill in the src data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
bce0e64521 pimd: Modify pim_parse_addr_group to use 'struct prefix_sg'
Modify the pim_parse_addr_group to use 'struct prefix_sg sg'.
This is the first of 2 commits to clean up this parsing to
be a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
3fdfd9433e pimd: Add ability for ifchannel *,G to know their S,G's
Add the ability for pim ifchannels *,G's to know their
corresponding S,G's.  This will facilitate handling
S,G,rpt state information better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
1c01dbd8f8 pimd: Send prune(S,G,RPT) with (*,G) join
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
anuradhak
3c72d65495 pim-msdp: part-2: SA cache support
This commit includes -
1. Maintaining SA cache with local and remote entries.
2. Local SA entries - there are two cases where we pick up these -
   - We are RP and got a source-register from the FHR.
   - We are RP and FHR and learnt a new directly connected source on a
     DR interface.
3. Local entries are pushed to peers immediately on addition and
   periodically. An immediate push is also done when peer session is
   established.
4. Remote SA entries - from other peers in the mesh group and passed
   peer-RPF checks.
5. Remote entries are aged out. No other way to del them
   currently. In the future we may add a knob to flush entries on
   peer-down.

Testing done -
Misc topologies with CL routers plus basic interop with another vendor (
we can process their SA updates and they ours).

Sample output -
root@rp:~# vtysh -c "show ip msdp sa"
Source                     Group               RP    Uptime
33.1.1.1               239.1.1.2            local  00:02:34
33.1.1.1               239.1.1.3            local  00:02:19
44.1.1.1               239.1.1.4        100.1.3.1  00:01:12
44.1.1.1               239.1.1.5        100.1.3.1  00:00:55
root@rp:~#

Ticket: CM-13306

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
ea4a71fcf7 pimd: Store ifchannel information in a global list too.
This fix handles two issues:

1) Searching entire vrf_iflist to get per interface pim_ifchannel_list
2) Display of ifchannel information in pim not being ordered correctly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
340bce7d35 pimd: Allow further refinement of pim join order
When a 'show ip pim join' is issued and we have
(S,G,rpt) being sent back up to us.  We need
to order correctly for this situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:14 -05:00
Donald Sharp
8711a53dbc pimd: Protect some zlog_debug messages
Protect some zlog_debug messages with if(...) so we
don't see them all the time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
fad009d288 pimd: Protect debug messages.
Protect some debug messages from being displayed always.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
ffac1326b2 pimd: Add some explanatory debugging for a error condition.
When we decide to ignore a incoming packet, allow detailed
debugging to give a pointer to where to go to understand the
issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
07d6bab3f2 pimd: Fix test for (S,G,rpt) prune inclusion.
The (S,G,rpt) prune inclusion was incorrectly considering
if the RPF' was the same for (S,G) and (*,G).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
e5b6b22997 pimd: No need to reset uptime if state is the same
Do not reset the time the mroute has been in it's
current state if we get a transition to the same state.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
3a66b17b69 pimd: Abstract setting of the spt bit a bit more
Allow the spt bit to be set appropriately from multiple
places.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
e43b86973c pimd: Add ability to set SPTBIT on a S,G stream
Implement 4.2.2 for setting the SPT bit.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
9c5e4d6275 pimd: Start addition of timer wheel
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
d67f268e94 pimd: Start coding of sending Prune (s,g,rpt) with *,g prune.
Add logic to show that we are making decisions about
the s,g,rpt prune send.  We are not actually sending
anything yet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
80d9c3a014 pimd: Add some helper functions.
Currently these are stubs to help debug logic.
Will be filled in as we go.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
66cc32fa0a pimd: Add the ability to test if the RPF' is the same
Test the ability to see if two RPF' are the same
or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Daniel Walton
0afd31c92b PIM After LHR swp bounce toward rx host, igmp_source_forward_start
failure message repeats in log

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

Ticket: CM-13340
2016-12-21 20:26:13 -05:00
Donald Sharp
7d1c3a085a pimd: Add ability to listen to igmp messages on 224.0.0.2
Some igmpv2 messages are sent to 224.0.0.2.  We were
not listening for these messages and as such we
were ignoring some withdrawals.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
a277fb8495 pimd: Fix 'ip igmp join ..'
When a static igmp join is issued, before routing
has come up, the ability to recover was accidently
removed from the code.

Ticket: CM-13379
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
e5009aed2f pimd: When nexthop lookup fails, back out gracefully
When the nexthop lookup fails when establishing the
upstream state as part of a register receive, kill
the upstream state.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
9244dd13db pimd: Allow FHR/RP/LHR to be one and the same
When we have a FHR/RP/LHR all on the same box, we were
experiencing a situation where we were not sending
a register stop nor where we setting the sptbit.

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

fd
2016-12-21 20:26:13 -05:00
Donald Sharp
5d84a3bc9a pimd: Modify Debug to be better
Make debugs of some pim processes easier
to interpret and understand.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
d1b64e31aa pimd: Be more careful looking up mroute statistics
When we get a request to look up the mroute statistics
from the kernel, ensure that the interface returned
is a valid usable interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
Donald Sharp
03417ccd6d pimd: pim upstream child list
Add the ability to keep the list of S,G's associated with
a *,G.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:13 -05:00
anuradhak
2a333e0f22 pim-msdp: part-1 - initial protocol infra.
This commit includes the following changes -
1. Support for MSDP peer DB (hash and sorted list).
2. Support for the following timers - keepalive, connect-retry, hold.
3. TCP session management (lower-ip is active, higher-ip is passive).
4. MSDP KA packet rx/tx.
5. Limited temporary config (will be replaced with the more automation
friendly RP-set).

Testing done -
Peer bringup/deletion (including interop with another vendor)

Sample out -
root@dell-s6000-04:~# sudo vtysh -c "show ip msdp peer"
Peer                       Local        Mesh-group        State Uptime
100.1.1.1              100.1.2.1           default  established 00:07:27
100.1.3.1              100.1.2.1           default  established 00:31:50
root@dell-s6000-04:~#

Coming soon -
1. part-2: SA cache management.
2. part-3: SPT setup using source in SA cache.
3. part-4: CLI cleanup.

Ticket: CM-13306

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:12 -05:00
Donald Sharp
06afa136e9 pimd: Fix gcc compile issue.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:12 -05:00
Donald Sharp
f99df3e77a pimd: Pass in upstream to pim_msg_join_prune_encode.
Pass in the upstream data structure to pim_msg_join_prune_encode
so it can decide to send (S,G,rpt) information if it wants to or
not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:12 -05:00
Donald Sharp
8b9c900bd1 pimd: Remove unused/unmaintained test commands
The test commands are not being maintained and
are not out of date with the rest of the system.  There
are better ways to test code and in addition these
commands if entered by a user could seriously impact
their running system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:12 -05:00
Donald Sharp
372eab92a2 pimd: Convert pim_joinprune_send to receive upstream
When sending a join/prune send in the upstream pointer.
this will allow us to implement some of the other state
machines necessary.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:12 -05:00