Commit Graph

435 Commits

Author SHA1 Message Date
Lou Berger
996c93142d *: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06 14:04:32 -05:00
Mladen Sablic
4d9ad5dcd0 pimd: Multicast traceroute client and router
This commit is the implementation of weak multicast traceroute.
It consists of IGMP module dealing with mtrace type IGMP messages
and client program mtrace/mtracebis for initiating mtrace queries.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-02-19 23:13:55 +01:00
Donald Sharp
57dac17c57 lib, pimd: Remove PIM_NODE as it is not needed
The PIM_NODE command is only being used to display
default vrf configuration.  Move this into the
vrf display and remove PIM_NODE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-30 03:21:42 -05:00
Donald Sharp
23f1c68bb2 pimd: Allow use-source to return more subtle error codes
The 'ip pim use-source ...' command returns a hard
success/failure.  Allow it to return a soft-failure
for when we re-enter the same line.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-08 16:01:22 -05:00
Donald Sharp
01841ed3a7 pimd: Add finer grain return codes for configuration
When PIM handles some MSDP commands, a repeated command
was causing a CMD_WARNING_CONFIG_FAILED.  This should
be a CMD_WARNING.  Fix the code to allow vtysh to handle
this appropriately.

Ticket: CM-19053
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-03 09:06:44 -05:00
Donald Sharp
9993f22cb1 pimd: When doing a RPF for a route, note when we fail the lookup
When we ask PIM to do a CLI search of a random (S,G) if the
(S,G) has no RPF due to no route, let the user know about
the issue instead of crashing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-30 13:29:14 -04:00
Donald Sharp
5b8d8894f8 Merge pull request #1298 from opensourcerouting/iface-rb-tree
Use rb-trees to store interfaces instead of linked-lists
2017-10-16 12:00:38 -04:00
Renato Westphal
eafc51b47b Merge pull request #1316 from donaldsharp/high_stuff
High stuff
2017-10-10 14:51:02 -03:00
Donald Sharp
be1d57fc40 pimd: Fix uninited idx for argv_find
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-10 12:31:32 -04:00
Renato Westphal
451fda4f9a *: use the FOR_ALL_INTERFACES abstraction from babeld
This improves code readability and also future-proofs our codebase
against new changes in the data structure used to store interfaces.

The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but
for now only babeld is using it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-10 09:05:46 -03:00
Renato Westphal
f4e14fdba7 *: use rb-trees to store interfaces instead of sorted linked-lists
This is an important optimization for users running FRR on systems with
a large number of interfaces (e.g. thousands of tunnels). Red-black
trees scale much better than sorted linked-lists and also store the
elements in an ordered way (contrary to hash tables).

This is a big patch but the interesting bits are all in lib/if.[ch].

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-10 09:05:02 -03:00
Donald Sharp
5fe58e3d62 pimd: Cleanup deep nesting in pim_cmd.c
Cleanup some deep nesting in pim_cmd.c so that functions
look easier on the eyes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-09 10:57:42 -04:00
Donald Sharp
48f41fe829 pimd: Display RPF address as part of json output
When displaying the 'show ip pim upstream' command.
Display proper information about the RPF address
choosen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-09 10:56:54 -04:00
Donald Sharp
513c846203 pimd: Fix multicast boundary command
1) Fix missing newlines
2) Write the correct cli out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-05 10:31:59 -04:00
Donald Sharp
45b7b09283 pimd: Add 'show ip mroute fill' command
When displaying the mroute table, add ability to fill
in all the missing data that for human eyes can be assumed.
This will allow people using grep over the command
can get more information.

sharpd@robot ~> sudo vtysh -c "show ip mroute fill"
Source          Group           Proto  Input      Output     TTL  Uptime
*               229.1.1.1       STATIC dum0       enp3s0     1    00:11:07 Default-IP-Routing-Table
*               229.1.1.1       STATIC dum0       virbr0     1    00:01:47 Default-IP-Routing-Table
sharpd@robot ~>

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-28 08:05:20 -04:00
Quentin Young
b0f525a84c
pimd: add support for boundaries
Adds the ability to filter PIM Joins & IGMP reports on an interface.
Enabling a multicast boundary on an interface for a particular group
will prevent the interface from appearing in the group's OIL.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-09-26 13:00:52 -04:00
Philippe Guibert
5c4dc90307 Merge pull request #1069 from donaldsharp/rfc_plist
PIM: allow overlapping group ranges for prefix-list and static RP's
2017-09-26 17:33:29 +02:00
Quentin Young
21b3e44eb4
pimd: fix some null pointer derefs in cli
If pim/igmp is not enabled on an interface, the ->info pointer will be
null. Need to check that before dereferencing it.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-09-22 17:27:20 -04:00
Renato Westphal
a2addae8fe *: use clang's 'ForEachMacros' format style option
This fixes the broken indentation of several foreach loops throughout
the code.

From clang's documentation[1]:
  ForEachMacros: A vector of macros that should be interpreted as foreach
  loops instead of as function calls.

[1] http://clang.llvm.org/docs/ClangFormatStyleOptions.html

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-15 14:53:46 -03:00
Donald Sharp
37664928bd pimd: Allow igmp join messages to return more detailed errors
Start the conversion of pim configuration commands to use
the ferr side channel to allow more detailed information
to be returned to cli commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-14 11:17:32 -04:00
Donald Sharp
3d225d48f0 pimd: Add new 'debug pim nht rp' command
All the rp debugs were a mish-mash of TRACE or ZEBRA,
but the reality they were all focused on handling NHT
issues associated with the RP's.  So let's create
a new debug 'debug pim nht rp' if you are having
issues with RP's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-14 11:17:28 -04:00
Donald Sharp
89b680829e pimd: Add ability to lookup RP group by table.
This feature does this:

Add the ability to store the non-prefix static RP
entries into a table.  Then to lookup the G to
find the RP in that table, finding the longest
prefix match across both prefix-lists and
static RP's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-31 10:30:19 -04:00
Donald Sharp
e691f179b6 pimd: Cleanup a variety of SA issues
1) Error check return from setsockopt and sockets
2) Check return codes for str2prefix
3) Clean up some potential NULL References

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24 20:34:28 -04:00
Donald Sharp
c206937b91 pimd: Cleanup S,GRPt prune handling on Mroute Loss
1) Clean up display of S,GRPt prune state to be more meaningful
2) Upon receipt of a S,GRPt prune make sure we transition to
   the correct state
3) Upon loss of a S,GRPt prune make sure we transition to
   the correct state as well as immediately send a *,G
   join upstream to propagate the loss of the prune.
4) Removal of a weird S,G state being installed upon
   loss of a S,G RPt prune.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-24 10:01:50 -04:00
Donald Sharp
87f6dc504d *: Add 'show debugging' command from vtysh
Allow vtysh to query every daemon about its
debugging status in one go.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-21 07:23:59 -04:00
Jafar Al-Gharaibeh
fd178a6a04 Merge pull request #1001 from dwalton76/pimd-CMD-WARNING
pimd: "No Path to RP address specified" should exit 0
2017-08-18 00:15:37 -05:00
Daniel Walton
c6e7b95248 pimd: "No Path to RP address specified" should exit 0
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

This could happen if routing isn't up yet but the command did take so we
should exit 0 here.  Testing:

root@cel-redxp-10[frr-dwalton76]# vtysh -c 'conf t' -c' ip pim rp
11.11.11.11'
% No Path to RP address specified: 11.11.11.11
root@cel-redxp-10[frr-dwalton76]# echo $?
0
root@cel-redxp-10[frr-dwalton76]#
2017-08-17 15:04:25 +00:00
David Lamparter
c9974c7995 Merge pull request #984 from donaldsharp/debugging
Some Small Pim Issues
2017-08-16 19:18:31 +02:00
Donald Sharp
47bf9e213a pimd: Add 'show ip msdp vrf all sa ...' command
Allow the ability to iterate over all vrfs.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 16:37:13 -04:00
Donald Sharp
15507b63e6 pimd: Rename duplicate JSON key
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 10:31:09 -04:00
Donald Sharp
2243bb17bd pimd: Allow user to specify ip address for 'no ip pim use-source'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 10:16:51 -04:00
Chirag Shah
2fd8de7d96 pimd: Fix pim bfd config order dependecny
Upon frr restart vtysh replays pim bfd configuration
cli before pim sm command, this results in failure
of pim bfd config on the VIF as it is not pim enabled yet.
Inside pim bfd configuration, call to create PIM vif
handler if it is not created yet.
no ip pim bfd, if pim is not enabled display warning and return.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-08-13 17:28:11 -07:00
Quentin Young
9643e2c75b
pimd: some pim cli fixes
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-08-07 12:42:05 -04:00
Donald Sharp
cc14df1391 pimd: Add ip pim rp keep-alive-time X
Ticket: CM-17134
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-02 08:17:36 -04:00
Donald Sharp
ad7b74c4f7 pimd: Convert to using a RB tree for the pim_ifp ifchannel_list
This patch does two things:
1) Converts the pim_ifp->ifchannel_list to a pim_ifp->ifchannel_rb
2) Removes the hashing to use the RB RB_FIND instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-02 07:44:00 -04:00
Donald Sharp
86b473a7e8 pimd: Rename pim_ifp->pim_ifchannel_list
Remove the redundant information in pim_ifp->pim_ifchannel_list
just call it pim_ifp->ifchannel_list

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-02 07:44:00 -04:00
Donald Sharp
1a8a3da8c2 pimd: Remove almost duplicate pim->ifchannel_list
The pim->ifchannel_list can be duplicated by iterating
over each vrf and then over each pim_ifp->pim_ifchannel_list
Since list handling is taking allot of time at scale
convert over to using this value.

Additionally clean up pim_cmd.c to have helper functions
to handle the actual encoding of data for output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-02 07:44:00 -04:00
Quentin Young
07a2935559 pimd: fix show ip msdp... NPD when vrf unknown
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-28 08:11:28 -04:00
Donald Sharp
19b807ca17 pimd: Allow the keepalive time to be per vrf.
Allow the keepalive period to be per vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-28 08:03:50 -04:00
Donald Sharp
f5da2cc2d8 pimd: Use JSON_STR
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-25 08:19:57 -04:00
Donald Sharp
bd4d05c577 pimd: Fix missing docstring in 'no debug pim trace detail'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:52:57 -04:00
Donald Sharp
5c3aac90d9 pimd: Fix 'show ip mroute vrf all count' crash
'show ip mroute vrf all count' crashes currently

This commit fixes that issue

Ticket: CM-17052
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:52:57 -04:00
Donald Sharp
a25de56b58 pimd: Add 'vrf all' commands where needed
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:52:55 -04:00
Donald Sharp
5cef40fcb7 pimd: Fixup NHT debugging to be a bit more coherent
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:41 -04:00
Donald Sharp
40f1f31be6 pimd: Add debug pim nht command
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:41 -04:00
Donald Sharp
64c8653095 pimd: Put 'struct pim_instance *' as the first function parameter
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:41 -04:00
Donald Sharp
b283a4ca38 pimd: Add 'show ip mroute vrf all [json]' command
Add the ability to dump all the vrf's associated
with pim.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:40 -04:00
Chirag Shah
96ceedc7a2 pimd: display down ports show ip pim interface
In show ip pim interface and  show ip pim interface <intf>
display State "down" pim enabled interfaces.

Ticket:CM-16809
Reviewed By:CCR-6398
Testing Done:
show ip pim interface
Interface  State          Address  PIM Nbrs           PIM DR  FHR IfChannels
br1           up          2.0.1.1         0            local    0          0
lo            up          6.0.0.1         0            local    0          0
pimreg        up          0.0.0.0         0            local    0          0
swp1        down          6.0.1.1         0            local    0          0
swp2          up          6.0.2.1         1            local    0          0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-07-24 13:51:40 -04:00
Donald Sharp
20a7e5fd85 pimd: Fixup PIM to handle vrf autocompletion
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:40 -04:00
Donald Sharp
9853a7a5b1 pimd: Fix ambiguous command
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:40 -04:00
Donald Sharp
6e89ed94f8 pimd: Convert code to handle vrf autocompletion
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:40 -04:00
Donald Sharp
200e2fe4d1 pimd: Fix msdp show command
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:39 -04:00
Donald Sharp
56243c3a4a pimd: Fix 'show ip pim state...' vrf changes
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:39 -04:00
Donald Sharp
5f40dadaf0 pimd: Fix help string
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:39 -04:00
Donald Sharp
56c238c9e9 pimd: Add 'debug pim trace detail' command
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:38 -04:00
Donald Sharp
1b973cb7c0 pimd: Fix mixup in addition to vrf node
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:38 -04:00
Donald Sharp
bc14b6c7a4 pimd: Fix crash in 'show ip multicast vrf..'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:38 -04:00
Donald Sharp
c68ba0d7bf pimd: Convert pim_cmd.c to use correct pim instance
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:38 -04:00
Donald Sharp
f02d59db8b pimd: Add vrf help strings to some commands
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:38 -04:00
Donald Sharp
c3169ac780 pimd: Start 'show ip pim [vrf NAME] ...' conversions
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:38 -04:00
Donald Sharp
02a16316f3 pimd: Add vrf ability to msdp show commands
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:37 -04:00
Donald Sharp
4f9f3925d6 pimd: All CONFIG_NODE commands are now available in VRF_NODE
Note -> Some commands storage needs to be moved into pim_instance

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:37 -04:00
Donald Sharp
ae4a6b57ca pimd: Create macro to get appropriate pim instance
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:37 -04:00
Donald Sharp
9ecb7b7747 pimd: Get show run to display vrf sub mode
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:37 -04:00
Donald Sharp
71ad9915e7 pimd: Make pim_ssmpingd.c 'struct pim_instance' aware
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:37 -04:00
Donald Sharp
472ad3832c pimd: Make msdp struct pim_instance * aware
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:37 -04:00
Donald Sharp
2ad78035cc pimd: Make pim MSDP pim instance aware to some extent
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:37 -04:00
Donald Sharp
6f439a7058 pimd: Cleanup pim_ssm.c to use 'struct pim_instance *'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:36 -04:00
Donald Sharp
611925dc02 pimd: Convert channel_oil_hash and list into 'struct pim_instance *'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:36 -04:00
Donald Sharp
7cfc7bcfe7 pimd: Convert vif and ifindex lookups to use 'struct pim_instance *'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:36 -04:00
Donald Sharp
f88df3a642 pimd: Move pim_ifchannel_list and vif array into 'struct pim_instance *'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:36 -04:00
Donald Sharp
d9c9a9ee06 pimd: Convert pim_rp.c to use 'struct pim_instance *'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:36 -04:00
Donald Sharp
9b29ea95fc pimd: Remove pimg from pim_upstream.c
Move the upstream_list, hash and wheel into 'struct pim_instance'
Remove all pimg to pim in pim_upstream

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:35 -04:00
Donald Sharp
fec883d95a pimd: pim_rp.c -> convert pimg to pim
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:35 -04:00
Donald Sharp
25b787a287 pimd: Remove pimg from pim_nht.c in totality
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:35 -04:00
Donald Sharp
25bdac421e pimd: Add 'struct pim_instance' to find_or_track_nexthop
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:35 -04:00
Donald Sharp
cb9c7c50d3 pimd: Refactor some functions
A bunch of functions had return values that were never
checked for ( and not needed ) and opposite return values
for proper calling function boolean logic.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:35 -04:00
Donald Sharp
4e0bc0f0a8 pimd: Refactore qpim_static_route_list into pim->static_routes
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:35 -04:00
Donald Sharp
8395de9a9c pimd: Fix 'show ip multicast'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:35 -04:00
Donald Sharp
ecca97acb3 pimd: Modify 'show ip multicast' to be VRF aware
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:34 -04:00
Donald Sharp
43e40fdfe1 pimd: Create the pimreg per vrf 2017-07-24 13:51:34 -04:00
Donald Sharp
ff673f4525 pimd: Start conversion of socket and counters for VRF
Convert the socket fd to be owned by the pimg pointer as
well as the counters associated with the fd.  This will
allow us to future proof our code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:33 -04:00
Donald Sharp
0708beb1f4 pimd: Cleanup use of VRF_DEFAULT to pimg->vrf_id
Use the appropriate vrf_id instead of always defaulting
to VRF_DEFAULT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-07-24 13:51:33 -04:00
David Lamparter
9d303b37d7 Revert "*: reindent pt. 2"
This reverts commit c14777c6bf.

clang 5 is not widely available enough for people to indent with.  This
is particularly problematic when rebasing/adjusting branches.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-22 14:52:33 +02:00
whitespace / reindent
c14777c6bf
*: reindent pt. 2
w/ clang 5

* reflow comments
* struct members go 1 per line
* binpack algo was adjusted
2017-07-17 15:26:02 -04:00
whitespace / reindent
d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter
2d8270596a Merge remote-tracking branch 'frr/master' into newline-redux
Lots of conflicts from CMD_WARNING_CONFIG_FAILED...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 13:07:30 +02:00
David Lamparter
625e016d14 *: remove VTYNL, part 6 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:03 +02:00
David Lamparter
61b7d449bd *: remove VTYNL, part 3 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:03 +02:00
David Lamparter
6d3c2ed4ed *: remove VTYNL, part 1 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:02 +02:00
David Lamparter
181039f3d7 *: ditch vty_outln(), part 2 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:19:58 +02:00
Daniel Walton
f1a05de982 vtysh: return non-zero for configuration failures
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

This allows frr-reload.py (or anything else that scripts via vtysh)
to know if the vtysh command worked or hit an error.
2017-07-13 19:56:08 +00:00
David Lamparter
5c7571d43f *: ditch vty_outln(), part 1 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-13 20:29:22 +02:00
Quentin Young
7111c1a0cd
*: fix excess docstring
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-05 15:33:00 -04:00
Quentin Young
e31b6333f4 *: vty_outln (vty, "") --> vty_out (vty, VTYNL)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:56 +00:00
Quentin Young
1318e7c841 *: s/VTY_NEWLINE/VTYNL/g
Should be able to fit more vty_out onto one line now

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:54 +00:00
Quentin Young
96ade3ed77 *: use vty_outln
Saves 400 lines

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:31:28 +00:00
Donald Sharp
71007eab71 pimd: Cleanup ifp->info setup
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-13 13:28:20 -04:00
David Lamparter
68b2595ec9 Merge pull request #576 from chiragshah6/pim_dev
pimd: pim bfd support
2017-05-30 14:37:08 +02:00
Donald Sharp
4bf6638636 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-19 08:09:42 -04:00
David Lamparter
be1f2d1802 Merge pull request #586 from donaldsharp/msdp_crashalicious
pimd: Fix crash from cli missinterpertation
2017-05-19 13:38:48 +02:00
Donald Sharp
53c438dae2 pimd: Fix crash from cli missinterpertation
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-18 23:06:12 -04:00
David Lamparter
57463530f3 Merge branch 'stable/3.0'
Conflicts:
	ospf6d/ospf6_lsa.c
	ospfd/ospf_vty.c
	zebra/interface.c

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-18 12:28:12 +02:00
David Lamparter
303f85d545 Merge branch 'frr/pull/548' ("Pim dev 3.0 defect fixes")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-18 11:34:50 +02:00
Chirag Shah
ba4eb1bccf pimd: pim bfd support
All PIM Neighbors for a given pim interface is registered with
BFD.
Upon receiving BFD status down event, PIM Neighbor with BFD info is deleted.
Add pim bfd configuraiton (CLI) per interface, '[no] ip pim bfd'

Testing Done:
Configure BFD under PIM interface on all neighbor routers,
check bfd sessions up, remote end unconfigure BFD, results in BFD session down.
Previous state was UP to New state DOWN, results in PIM neighbor delete behind
that particular pim interface.
Pim-smoke Results:
Ran 94 tests in 7409.680s
FAILED (SKIP=8, failures=2)

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-17 22:42:28 -07:00
Donald Sharp
934ec54171 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-17 08:51:25 -04:00
Chirag Shah
30cfe9a291 pimd: fix ip pim hello option does not take in effect
If frr.conf file has pim hello option setup prior to pim sm under an interface, upon frr start/restart hello option cli replayed prior to sm command
from vtysh. Added a code in pim hello option cli handler to create pim vif if it does not exist.

Testing Done:
configure pim hello options before pim sm in frr.conf file and restart frr

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-16 19:30:14 -07:00
Donald Sharp
76ca2fbaa2 pimd: Fix core from json static mroute show
When we have no normal mroutes and only static mroutes
there exists a code path where we attempted to dereference
c_oil when we were showing static mroutes.  Looks like
a cut-n-paste error, we should be using s_route->c_oil there

Ticket: CM-15013
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-16 13:01:14 -04:00
David Lamparter
896014f4bc *: make consistent & update GPLv2 file headers
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header.  (The style with * at the beginning won out with
580 to 141 in existing files.)

Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15 16:37:41 +02:00
Jafar Al-Gharaibeh
54f12d6f77 Merge pull request #435 from chiragshah6/pim_dev
pimd: Introduce show command for protocol counters
2017-05-09 10:50:56 -05:00
Donald Sharp
6281320446 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-08 16:51:21 -04:00
Chirag Shah
0c62a89997 pimd: fix pim ecmp rebalance config write
ip pim ecmp and ip pim ecmp rebalance configuration CLIs were
not adding to Quagga.confg or running configuration.
Added both the configuration write in Config write handler.

Testing Done: Execute configuration cli and verified running config
and Quagga.conf file containing both configuration.

03# show running-config
Building configuration...

Current configuration:
!
ip multicast-routing
ip pim rp 6.0.0.9 230.0.0.0/16
ip pim join-prune-interval 61
ip pim ecmp
ip pim ecmp rebalance
!

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-06 17:38:18 -07:00
Renato Westphal
313605cb92 *: fix a bunch of segfaults detected by a CLI fuzzer
This patch fixes the following segfaults:
zebra aborted: vtysh -c "show ipv6 mroute"
zebra aborted: vtysh -c "configure terminal" -c "debug zebra kernel msgdump"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no packet-loss"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no metric"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no ava-bw"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no res-bw"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no use-bw"
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "area 1.1.1.1 nssa"
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "area 4294967295 nssa"
pimd aborted: vtysh -c "show ip msdp sa 1.1.1.1"
pimd aborted: vtysh -c "configure terminal" -c "ip ssmpingd"
pimd aborted: vtysh -c "configure terminal" -c "no ip ssmpingd"
pimd aborted: vtysh -c "configure terminal" -c "no ip msdp mesh-group WORD source"
pimd aborted: vtysh -c "configure terminal" -c "interface eth99" -c "ip pim hello 180"
bgpd aborted: vtysh -c "show bgp l2vpn evpn rd 1:1"
bgpd aborted: vtysh -c "clear vnc nve un *"
bgpd aborted: vtysh -c "clear vnc nve un 1.1.1.1"
bgpd aborted: vtysh -c "clear vnc nve un 2001:db8::1"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 cost 255 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 cost 255"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 cost 255 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 cost 255"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 cost 255 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 cost 255"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 cost 255 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 cost 255"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp ipv4 prefix-list NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp ipv6 prefix-list NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp route-map NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra ipv4 prefix-list NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra ipv6 prefix-list NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra route-map NAME"
bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "no set ipv6 vpn next-hop"
bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "set vpnv4 next-hop"
bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "set vpnv6 next-hop"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "address-family ipv6 vpn" -c "network 2001:db8::1/128 rd 1:1 tag WORD"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "address-family vpnv6 unicast" -c "network 2001:db8::1/128 rd 1:1 tag WORD"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "no neighbor WORD shutdown message MSG..."
bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "neighbor WORD shutdown message MSG..."

More to come later.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-04 14:39:58 -03:00
Donald Sharp
d476347d5d Merge remote-tracking branch 'origin/stable/3.0' 2017-05-04 13:35:25 -04:00
Jafar Al-Gharaibeh
b063aa2139 Fix: Off by one error, correct index for hold timer
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-05-02 17:23:34 -05:00
Donald Sharp
05ba625af7 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-02 15:52:09 -04:00
Jafar Al-Gharaibeh
6a8badfb9b Merge pull request #440 from donaldsharp/afi_safi3
Afi safi3
2017-05-02 14:20:30 -05:00
Donald Sharp
ebe9474310 pimd: Fix cli uplift mistakes
When we uplifted the cli from old -> new, I did not properly
handle the switch from <1-3> to (1-3) for number ranges.

Also fix some minor variable renaming that happened?

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-02 13:58:07 -04:00
Chirag Shah
c645ca8177 pimd: fix compilation failure.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02 10:31:10 -07:00
Chirag Shah
07d7a7641c pimd: fix extra space at the end
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02 10:19:32 -07:00
Chirag Shah
17d86e5038 pimd: fix help string for intf cntrs show cmd
Fix show interface traffic single command help string.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02 10:15:23 -07:00
Jafar Al-Gharaibeh
846ef66292 Fix: reverse logic of when to pass the supplied group address
This was causing a crash when no group address was passed
   because a garbage pointer valuse was used. It also was ignoring
   the group address when passing one.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-05-02 12:15:06 -05:00
Chirag Shah
a5ae6fbede pimd: fix show command for protocol counter
Fix the command syntex for single interface command

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02 07:29:59 -07:00
Chirag Shah
394381887e pimd: Introduce show command for protocol counters
For all pim enabled interfaces and single pim enable interface command.
Clear command to clear protocol counters stats.

'show ip pim interface traffic {WORD} {json}'

'clear ip pim interface traffic'

Testing Done: bringup Pim configuration and form RPT and SPT and check
show ip pim interface traffic command output,
perform clear form of interface traffic command and
verified all counters reset via show form of command.
tor-21# show ip pim interface traffic swp2

Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
swp2             22/22             0/10            0/0             0/0             0/0             0/0

leaf-22# show ip pim interface traffic swp3

Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
swp3             23/22            10/0             0/0             0/0             0/0             0/0

spine-1#show ip pim interface traffic

Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
br1               0/1              0/0             0/0             0/0             0/0             0/0
lo                0/0              0/0             0/0             0/0             0/0             0/0
swp1              0/1              0/0             0/0             0/0             0/0             0/0
swp2              0/1              0/0             0/0             0/0             0/0             0/0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-01 18:47:00 -07:00
Jafar Al-Gharaibeh
71d702a85e Merge branch 'stable/3.0' into pim_dev_3_0 2017-04-28 10:38:05 -05:00
Chirag Shah
36b1fa8631 pimd: Enable igmp on igmp version change cli
Execute ip igmp version 3 under swp interface,
verified show running displayed 'ip igmp' configuration.
Continuous sending group membership, performed 'no ip igmp'
and verified, group membership flushed. Performed
'ip igmp version 3', verified 'show ip igmp groups'
displaying igmp membership re-populated.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-04-25 12:51:48 -07:00
Chirag Shah
633988a70d pimd: Pim Nexthop Tracking support with ECMP
In this patch, PIM nexthop tracking uses locally populated nexthop cached list
to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks
the first nexthop as RPF.
Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob.
By default, PIM ECMP is disabled.
Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache
entry to switch new path based on hash chosen path.
Introduced, show command to display pim registered addresses and respective nexthops.
Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G).
Re-Register an address with nexthop when Interface UP event received,
to ensure the PIM nexthop cache is updated (being PIM enabled).
During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if
any of nexthop's IPv4 address changes/resolves due to neigbor UP event.

Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using
nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events.
Executed pim-smoke with knob disabled.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
(cherry picked from commit cba4448178)
2017-04-25 12:51:18 -07:00
Renato Westphal
94f6a203b7 Merge pull request #345 from chiragshah6/pim_dev
pimd: Pim ECMP changes along with nexthop tracking using cached DB
2017-04-24 16:59:58 -03:00
Donald Sharp
df94f9a91d pimd: Add prefix list handling to spt-switchover
To the 'ip pim spt-switchover infinity-and-beyond' command
add 'prefix-list <PLIST>'. To the command.

Use this as the basis to deny (Not immediate switchover)
or permit (Immediate switchover), based upon matching
the group address and the prefix-list.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-20 15:55:50 -04:00
Quentin Young
9ea49d61d2 pimd: fix 'show ip msdp sa ...'
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-04-17 19:24:28 +00:00
Quentin Young
529aa94e24 pimd: fix off-by-one in no ip pim rp ...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-04-15 06:23:22 +00:00
Jafar Al-Gharaibeh
b43d5ea330 Merge pull request #304 from donaldsharp/pim_5549
Pim 5549 Additions
2017-04-10 11:07:58 -05:00
Donald Sharp
4390fb9991 pimd: Fix various sizeof and buffer length issues
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-06 17:57:24 -04:00
Chirag Shah
cba4448178 pimd: Pim Nexthop Tracking support with ECMP
In this patch, PIM nexthop tracking uses locally populated nexthop cached list
to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks
the first nexthop as RPF.
Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob.
By default, PIM ECMP is disabled.
Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache
entry to switch new path based on hash chosen path.
Introduced, show command to display pim registered addresses and respective nexthops.
Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G).
Re-Register an address with nexthop when Interface UP event received,
to ensure the PIM nexthop cache is updated (being PIM enabled).
During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if
any of nexthop's IPv4 address changes/resolves due to neigbor UP event.

Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using
nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events.
Executed pim-smoke with knob disabled.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-04-06 11:18:07 -07:00
Donald Sharp
a7b2b1e298 pimd: Add the ability to never SPT switchover
Add the ability to allow pim to determine if we should
allow spt-switchover or not on the LHR.

Signed-off-by: Donald Sharp
2017-04-05 12:38:12 -04:00
Donald Sharp
0e374d906d pimd: Add # of ifchannels to 'show ip pim int'
Add the ability to see the number of ifchannels
associated with a particular interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-05 12:38:12 -04:00
Donald Sharp
2aaa554de9 Merge branch 'master' into pim_5549 2017-04-01 07:58:05 -04:00
Donald Sharp
294b6d7243 pimd: Receive incoming v6 addresses and place in pim_ifp list
Add code to properly receive v6 addresses up from zebra and to
properly place them into our interface secondary address list.

Additionally cleanup some code in pim_cmd.c that was broken
by these changes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-30 09:34:03 -04:00
Donald Sharp
71bbe73dc4 pimd: Add code to allow backwards compatibility
This code change adds the ability to specify that
we should be able to work with older versions
of PIM.

In future commits we will actually use this data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-30 09:34:03 -04:00
anuradhak
d2772e7b65 pimd: Remove interface type SSM.
Interface type has been replaced with the SSM range config. And SSM
groups can now co-exists with ASM groups. I have left the pim ssm
per-interface cli control hidden. It now enables pim-sm with a warning.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-15344
Testing Done: pim-smoke
2017-03-23 09:48:04 -07:00
anuradhak
15a5dafe44 pimd: Allow SSM groups to co-exist with ASM groups.
SSM groups (232/8 or user configured SSM range) can exist in the same
multicast network as ASM groups. For such groups all RPT related state
machine operations have to be skipped as defined by section 4.8 of
RFC4601 -
1. Source registration is skipped for SSM groups. For SSM groups mroute
is setup on the FHR when a new multicast flow is rxed; however source
registration (i.e. pimreg join) is skipped. This will let the ASIC black
hole the traffic till a valid OIL is added to the mroute.
2. (*,G) IGMP registrations are ignored for SSM groups.

Sample output:
=============
fhr#  sh ip pim group-type
SSM group range : 232.0.0.0/8
fhr#  sh ip pim group-type 232.1.1.1
Group type: SSM
fhr#  sh ip pim group-type 239.1.1.1
Group type: ASM
fhr#

Sample config:
=============
fhr(config)# ip pim ssm prefix-list ssm-ranges
fhr(config)#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-15344
Testing Done:
1. SSM/ASM source-registration/igmp-joins.
2. On the fly multicast group type changes.
3. pim-smoke.
2017-03-23 09:47:53 -07:00
Jafar Al-Gharaibeh
9ef2260577 Merge pull request #280 from donaldsharp/more_pim
More pim
2017-03-21 10:34:40 -05:00
Donald Sharp
d1e77284c1 pimd: Add display of SGRpt state for ifchannel
When we get a SGrpt Prune embedded in the *,G Join,
Display the created ifchannel as being SGRpt state.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-17 14:48:14 -04:00
Donald Sharp
2f89147c6b pimd: Add additional output to 'show ip pim state json'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-16 18:57:11 -04:00
Donald Sharp
1306c09a1b *: Refactor if_lookup_by_name to be VRF aware
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-15 10:36:23 -04:00
anuradhak
755210ab1d pimd: display reg-state and join-state info in the pim_upstream output
Changed the state field in the "sh ip pim upstream" output to include
register and join state info as a comma separated value. Register info
is supressed if reg-state=NoInfo.

Sample output:
=============
root@fhr:/home/cumulus# net show pim upstream
Iif       Source          Group           State       Uptime   JoinTimer
RSTimer   KATimer   RefCnt
swp1      33.1.1.1        239.1.1.2       J,RegP      00:00:18 --:--:--
00:00:44  00:03:24       2
root@fhr:/home/cumulus#

root@rp:/home/cumulus# net show pim upstream
Iif       Source          Group           State       Uptime   JoinTimer
RSTimer   KATimer   RefCnt
lo        *               239.1.1.2       J           00:02:08 00:00:52
--:--:--  --:--:--       1
swp1      33.1.1.1        239.1.1.2       J           00:00:16 00:00:11
--:--:--  00:03:26       1
root@rp:/home/cumulus#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-14700
Testing Done: pim-smoke
2017-03-10 10:48:47 -08:00
anuradhak
0c2ebf00a6 pimd: add new/distinct enumeration for pim register state
With the separation of register-state and upstream-join-state we no
longer need an enumeration that covers both states. This commit includes
the following -
1. Defined new enumeration for reg state (this 1:1 with RFC4601).
2. Dropped JOIN_PENDING enum value from upstream join state. RFC4601
only define two values NOT_JOINED and JOINED for this state.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-14700
Testing Done: Verified register setup manually and ran pim-smoke
2017-03-10 10:48:41 -08:00
anuradhak
e0e127b009 pimd: Separate the register and upstream join states on the FHR
On the FHR upstream-join-state is not particularly relevant as we
don't need to send upstream JPs for the SG. So that field was being
overloaded with the register-state. However some of the events that
triggered changes to the JoinDesired macro were accidentally overwriting
the state with join info (instead of treating it as register info)
confusing the register state machine.

To make the PIM RFC macros' implemention simple I have separated out
the register-state. And upstream->state now solely describes the
upstream-join-state independent of the role of the PIM router.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-14700
Testing Done: verified pim-register state-machine with separate and
combined FHR/RP routers. Also ran pim-smoke.
2017-03-10 10:48:38 -08:00
David Lamparter
d7c07bb47a Merge branch 'frr/pull/243' ("Pim jp agg")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-07 16:42:20 +01:00
Donald Sharp
344cbf76bc pimd: Fix 'show ip pim state' command
The 'show ip pim state' command was not
working quite correctly from when
we moved over to the new vtysh-grammar.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02 10:57:45 -05:00
Donald Sharp
b8d16be287 pimd: Hide 'ip multicast-routing' command
Automatically turn on pim if the daemon is turned on.
Hide the 'ip multicast-routing' command
Disable the 'no ip multicast-routing' command
Do not display the 'ip multicast-routing' command.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02 10:33:23 -05:00
Donald Sharp
21419f5932 pimd: Turn on igmp when igmp commands are entered
When you enter these commands, under an interface:

ip igmp version ...
ip igmp query-interval ...
ip igmp query-max-response-time ...
ip igmp query-max-response-time-dsec ...

These commands will now just turn on igmp for the
interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02 10:12:52 -05:00
Donald Sharp
982bff8972 pimd: Join/Prune Aggregation
Add the ability for PIM to send Join/Prunes as an
aggregated message instead of individual messages
for each S,G.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-03-02 08:13:03 -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
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
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
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
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
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
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
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
b58ed1f8a8 Merge remote-tracking branch 'origin/master' into pim_lib_work2 2017-01-17 21:01:56 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
580d761266 pimd: Fix possible crash using 'struct pim_nexthop'
When passing in a nexthop data structure to nexthop_lookup
ensure that it is zero'ed out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:12 -05:00
Donald Sharp
e71bf8f7bd pimd: Add basic nexthop lookup cached information.
Cache the last time we looked up the nexthop for this particular
address.  Store time to usec accuracy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-12-21 20:26:12 -05:00
Daniel Walton
7e14782362 pimd: always build json for show commands
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

This cleans up the following so that they always collect the data to
display in json structures and then either dumps the json output or
traverses it to produce the non-json output.

  show ip pim local-membership
  show ip pim interface
2016-12-21 20:26:12 -05:00
Daniel Walton
eaa54bdb67 pimd: replace grp_str[100] with grp_str[INET_ADDRSTRLEN]
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2016-12-21 20:26:11 -05:00
Daniel Walton
b05b72e80b pimd: add support for IGMPv2
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

Ticket: CM-7962
2016-12-21 20:26:11 -05:00
Donald Sharp
eb7a976a9d pimd: Allow debugs entered in conf t mode to persist
When entering debug commands under 'conf t' mode
allow the debugs to be saved for future fun and
adventure.

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