Commit graph

66 commits

Author SHA1 Message Date
Donald Sharp e8e277d564 pimd: Allow larger range for KAT(S,G)
Allow the KAT(S,G) time be set to up to 60000
seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:08 -05:00
Donald Sharp 284b4301e4 pimd: Track the # of times we ask for nexthp information
Keep an idea of how many times we are asking zebra
for nexthop information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:07 -05:00
Donald Sharp 00d07c6fda pimd: Add "show ip pim rp-info" command
List the RP information we have configured.

Fix bug where we were not properly initializing some code

Ticket: CM-12617
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:07 -05:00
Donald Sharp f24405b1e8 pimd - Fix rpf lookup to what it was originally
I tried to be smart and skirt around rpf lookup if I knew
the incoming interface.  This turns out to be not necessarily
a good thing because we can easily have asymetrical routing.

This fix removes the attempt to cache the ifp we received
the incoming packet on and just lets the lookup work like
it should.

Additionally it removes the weird hardcoding of the rpf
interface from the register stuff.

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

reb
2016-12-21 20:26:07 -05:00
Donald Sharp c980295412 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>
2016-12-21 20:26:06 -05:00
Donald Sharp 01408ede34 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>
2016-12-21 20:26:06 -05:00
Donald Sharp 4304f95c86 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>
2016-12-21 20:26:06 -05:00
Donald Sharp 6c7197b142 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>
2016-12-21 20:26:06 -05:00
Donald Sharp 05b0d0d0ec 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>
2016-12-21 20:26:06 -05:00
Donald Sharp 2ecb76d375 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>
2016-12-21 20:26:05 -05:00
Donald Sharp 36d6bd7d34 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>
2016-12-21 20:26:05 -05:00
Donald Sharp 75a26779e8 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>
2016-12-21 20:26:05 -05:00
Donald Sharp 4ed0af7013 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>
2016-12-21 20:26:05 -05:00
Donald Sharp ad6ec47b81 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>
2016-12-21 20:26:05 -05:00
Donald Sharp 9add3b8812 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>
2016-12-21 20:26:04 -05:00
Donald Sharp 2a05c94c91 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>
2016-12-21 20:26:04 -05:00
Donald Sharp 13afbd05fd pimd: Create raw socket for register packets to be forwarded.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:04 -05:00
Donald Sharp 346cffe31e 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>
2016-12-21 20:26:04 -05:00
Donald Sharp 984c84f486 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>
2016-12-21 20:26:04 -05:00
Donald Sharp 7e0cff2f98 pimd: Remove unnecessary QuaggaId
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:03 -05:00
Donald Sharp 6928363995 pimd: convert pim_ifchannel_local_membership_add to use struct prefix sg
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:03 -05:00
Donald Sharp 05e451f828 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>
2016-12-21 20:26:03 -05:00
Donald Sharp 99064df9e3 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>
2016-12-21 20:26:02 -05:00
Donald Sharp d7259eac8b pimd: create pim_upstream_state2str
Allow update of show command to understant all
pim upstream states.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:02 -05:00
David Lamparter cdc2d76507 *: coccinelle-replace vty->index
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-09 17:36:25 +01:00
David Lamparter 0b84f29490 *: make DEFUN installations file-local
This moves all install_element calls into the file where the DEFUNs are
located.  This fixes several small related bugs:

- ospf6d wasn't installing a "no interface FOO" command
- zebra had a useless copy of "interface FOO"
- pimd's copy of "interface FOO" was not setting qobj_index, which means
  "description LINE" commands would fail with an error

The next commit will do the actual act of making "foo_cmd" static.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-01 17:25:56 +01:00
Quentin Young d7fa34c1bc all: Fix underfull doc strings, part 2
Add missing docstrings and separating \n.
Also eat some low-hanging refactoring fruit.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-11-08 01:46:04 +00:00
Quentin Young e52702f29d Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>

Conflicts:
	bgpd/bgp_route.c
	bgpd/bgp_routemap.c
	bgpd/bgp_vty.c
	isisd/isis_redist.c
	isisd/isis_routemap.c
	isisd/isis_vty.c
	isisd/isisd.c
	lib/command.c
	lib/distribute.c
	lib/if.c
	lib/keychain.c
	lib/routemap.c
	lib/routemap.h
	ospf6d/ospf6_asbr.c
	ospf6d/ospf6_interface.c
	ospf6d/ospf6_neighbor.c
	ospf6d/ospf6_top.c
	ospf6d/ospf6_zebra.c
	ospf6d/ospf6d.c
	ospfd/ospf_routemap.c
	ospfd/ospf_vty.c
	ripd/rip_routemap.c
	ripngd/ripng_routemap.c
	vtysh/extract.pl.in
	vtysh/vtysh.c
	zebra/interface.c
	zebra/irdp_interface.c
	zebra/rt_netlink.c
	zebra/rtadv.c
	zebra/test_main.c
	zebra/zebra_routemap.c
	zebra/zebra_vty.c
2016-10-17 23:36:21 +00:00
Donald Sharp 0b1442e37b *: Consolidate all double VIEW_NODE and ENABLE_NODE's
If a command is put into the VIEW_NODE, it is going into the
ENABLE_NODE as well.  This is especially true for show commands.
As such if a command is in both consolidate it down to VIEW_NODE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-10-07 21:05:06 -04:00
Daniel Walton 58749582a9 all: scrubbed some argc CHECK MEs
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-30 00:16:31 +00:00
Daniel Walton abddf07563 all: scrubbed some argc CHECK MEs
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-29 19:51:56 +00:00
Daniel Walton 67656e9b65 all: added CHECK ME for DEFUNs that look at argc
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-29 17:48:57 +00:00
Daniel Walton 80d3d26b36 pimd: removed undebug CHECK MEs
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-27 00:26:41 +00:00
Daniel Walton e961923c72 bgpd, etc: changed .LINE to LINE...
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-27 00:07:46 +00:00
Daniel Walton 9ccf14f739 Expand #defines in command strings
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-25 14:10:48 +00:00
Daniel Walton b181fa04e2 pimd: add 'int idx_foo' argv index variables
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 20:03:41 +00:00
Daniel Walton f412b39a33 ALIAS removal for bgp, ospf, pim, isis, rip, ripng, lib and zebra
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 03:55:26 +00:00
Daniel Walton 91ac1d43ad pimd: argv update
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-09-23 00:14:41 +00:00
Daniel Walton 5cee71fb64 Revert "pimd: Convert to the new way of working"
This reverts commit 0564b02e43.
2016-09-22 18:21:49 +00:00
Donald Sharp 0564b02e43 pimd: Convert to the new way of working 2016-09-20 23:35:51 -04:00
Renato Westphal ea8b7c71a7 build/solaris: fix one error and a few warnings
Signed-off-by: Renato Westphal <renato@openbsd.org>
2016-08-26 20:07:18 -04:00
Quentin Young 9b34069d02 lib: Add newline terminators to pim docstring
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-03 19:30:06 +00:00
Donald Sharp 3667e8a081 pimd: Add generic function to retrieve mroute stats
Add a generic function to retrieve mroute statistics
from the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-07-13 11:41:41 -04:00
Donald Sharp 58302dc724 pimd: Track if the mroute is installed or not
Track whether or not if a mroute has been installed
or not.  If not don't display information about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-07-12 15:22:10 -04:00
Donald Sharp c171d6d8c9 pimd: Refactor pim_mroute_add and _del
The struct mfcctl should not be passed around.  Pass around
the channel oil instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-07-12 15:16:53 -04:00
Donald Sharp 9867746afe pimd: Refactor 'struct static_route' to use channel_oil
The 'struct static_route' data structure duplicated a
decent bit of what is the in the struct channel_oil.
Refactor.  This will set us up for further cleanup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-07-12 15:09:25 -04:00
Donald Sharp 2e948c7813 pim: Show Iif for 'show ip pim upstream' command
Modify the 'show ip pim upstream' command to
show the expected incoming interface for
the source.

Ticket: CM-11220
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-29 15:49:57 -04:00
Donald Sharp a920d6e72a pimd: Fix checking to see if we are a RP or not
When we create the pim_ifp we need to see if this
interface allows us to elect our selves the RP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-22 16:39:31 -04:00
Donald Sharp 651d0f713e pim: Fix NOCACHE to use incoming interface
When the kernel sends a NOCACHE message to
pim we were looking up the interface to
use for the incoming multicast packet
based upon the source.  No need to do
that trust that the kernel has properly
identified it and use that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-06-17 15:40:29 -04:00
David Lamparter 7a2fbbf0ee *: make sure zebra.h is always included first
zebra.h pulls in config.h, which results in fiddling with things like
__FILE_OFFSET_BITS. It must always be included first, in order to set
flags that influence the compiler via <features.h>.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 821df2cf18e5978cc7ab532a8695444380d08270)
2016-06-09 10:45:22 -04:00