Commit Graph

584 Commits

Author SHA1 Message Date
saravanank
4d36096888 pimd: show ip igmp groups json output - Make group array for each interface
JSON output for igmp group display is modified as follows for better python handling.
1. Under each interface make array of group as an object
2. Include source and group inside each group object

These improvements are required for the set of topotest cases which will be upstreamed shortly.

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-04-08 21:39:21 -07:00
saravanank
339f769530 pimd: Implement watermark warning for igmp group count and add igmp group count
This CLI will allow user to configure a igmp group limit which will generate
a watermark warning when reached.
Though watermark may not make sense without setting a limit, this
implementation shall serve as a base to implementing limit in future and helps
tracking a particular scale currently.

Testing:
=======

ip igmp watermark-warn <10-60000>

on reaching the configured number of group, pim will issue warning

2019/09/18 18:30:55 PIM: SCALE ALERT: igmp group count reached watermak limit: 210(vrf: default)

Also added group count and watermark limit configured on cli - show ip igmp groups [json]

<snip>

Sw3# sh ip igmp groups json
{
  "Total Groups":221,  <=====
  "Watermark limit":210, <=========
  "ens224":{
    "name":"ens224",
    "state":"up",
    "address":"40.0.0.1",
    "index":6,
    "flagMulticast":true,
    "flagBroadcast":true,
    "lanDelayEnabled":true,
    "groups":[
      {
        "source":"40.0.0.1",
        "group":"225.1.1.122",
        "timer":"00:03:56",
        "sourcesCount":1,
        "version":2,
        "uptime":"00:00:24"

<\snip>

<snip>

Sw3(config)# do sh ip igmp group
Total IGMP groups: 221
Watermark warn limit(Set) : 210
Interface        Address         Group           Mode Timer    Srcs V Uptime
ens224           40.0.0.1        225.1.1.122     ---- 00:04:06    1 2 00:13:22
ens224           40.0.0.1        225.1.1.144     ---- 00:04:02    1 2 00:13:22
ens224           40.0.0.1        225.1.1.57      ---- 00:04:01    1 2 00:13:22
ens224           40.0.0.1        225.1.1.210     ---- 00:04:06    1 2 00:13:22

<\snip>

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-04-08 21:39:13 -07:00
Quentin Young
a5f610e474 pimd: fix BSM JSON keys
We use camelCase keys in FRR.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-05 23:54:12 -04:00
Quentin Young
4ad05982dc
Merge pull request #6080 from sarav511/buf_inc
pimd: increase buffer size for prefix str while printing bsrp-info
2020-03-24 12:29:47 -04:00
Russ White
bb1cceed4a
Merge pull request #6024 from patrasar/mroute_reshape
pimd: re-shaping show ip mroute outout
2020-03-24 10:16:43 -04:00
saravanank
93a5bc8022 pimd: increase buffer size for prefix str while printing bsrp-info
Problem: output is cut short when prefix string all octets are 3 digit.
RCA: Buffer was allocated only to hold ip addr str.

Fix: Added 3 bytes more to hold prefix length and a /.
Modified buffer in 'show ip pim bsrp-info' and 'show ip pim bsm database'

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-03-24 00:24:56 -07:00
Donald Sharp
a01f317b0f
Merge pull request #6008 from sarav511/max_vif
pimd: Do not allow to configure multicast on more than MAXVIF interfaces
2020-03-23 11:28:45 -04:00
Donatas Abraitis
2a7280e2e5
Merge pull request #5882 from patrasar/2386429
pimd: fix pim interface traffic & pim rp-info json command
2020-03-18 11:26:44 +02:00
Sarita Patra
5dff8b9dcf pimd: re-shaping show ip mroute outout
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-17 21:44:20 -07:00
Russ White
09c04bc490
Merge pull request #5849 from donaldsharp/pim_register_prefix_list
Pim register prefix list
2020-03-17 14:57:10 -04:00
Donald Sharp
7967afda07
Merge pull request #5880 from patrasar/2371558
pimd: fix OIL not removed after IGMP prune
2020-03-17 13:40:53 -04:00
Donald Sharp
fc74cbe76c
Merge pull request #5940 from patrasar/214257
pimd: add flags in show ip mroute command
2020-03-17 06:38:41 -04:00
Sarita Patra
9443810eef pimd: fix OIL not removed after IGMP prune
Issue: Client1------LHR-----(int-1)RP(int-2)------client2
Client2 send IGMP join for group G.
Client1 send IGMP join for group G.
verify show ip mroute in RP, will have 2 OIL.
Client2 send IGMP leave.
Verify show ip mroute in RP, will still have 2.

Root cause: When RP receives IGMP join from client2, it creates
a (s,g) channel oil and add the interface int-2 into oil list and
set the flag PIM_OIF_FLAG_PROTO_IGMP to int-2
Client1 send IGMP join, LHR will send a (*,G) join to RP. RP will
add the interface int-1 into the oil list of (s,g) channel_oil and
will set the flag PIM_OIF_FLAG_PROTO_IGMP and PIM_OIF_FLAG_PROTO_PIM
to the int-1 and set PIM_OIF_FLAG_PROTO_PIM to int-2 as well. It is
happening because of the pim_upstream_inherited_olist_decide() and
forward_on() get all the oil and update the flag wrongly.
So now when client 2 sends IGMP prune, RP will not remove the int-2
from oil list since both PIM_OIF_FLAG_PROTO_PIM & PIM_OIF_FLAG_PROTO_IGMP
are set, it just unset the flag PIM_OIF_FLAG_PROTO_IGMP.

Fix: Introduced new flags in if_channel, PIM_IF_FLAG_MASK_PROTO_PIM
& PIM_IF_FLAG_MASK_PROTO_IGMP. If a if_channel is created because of
pim join or pim (s,g,rpt) prune received, then set the flag
PIM_IF_FLAG_MASK_PROTO_PIM. If a if_channel is created becuase of IGMP
join received, then set the flag PIM_IF_FLAG_MASK_PROTO_IGMP.
When an interface needs to be added into the oil list check if
PIM_IF_FLAG_MASK_PROTO_PIM or PIM_IF_FLAG_MASK_PROTO_IGMP is set, then
update oil flag accordingly.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-16 21:54:34 -07:00
Sarita Patra
a7a5472ef2 pimd: fix pim interface traffic & pim rp-info json command
Issue 1: "show ip pim interface traffic" not show prune TX/RX
Rootcause : not added the variable in the json
Fix : add prune TX/RX in show ip pim interface traffic json

Issue 2: "show ip pim rp-info" not shows the key iAmRp when it is false
Rootcause: Only display the key when the value is true.
Fix: add iAmRp as false in show ip pim rp-info json

Issue 3: "show ip pim rp-info" not showing outbound interface if it is empty
Rootcause: Only display when there is any OIL

Fix: When RP is not reachable then, the outbound interface is Unknown
The command "show ip pim rp-info json" not displaying the outbound
interafce if it is unknown

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-16 21:44:38 -07:00
Sarita Patra
6a42461973 pimd: add flags in show ip mroute command
S - Sparse Mode
C - indicates there is a member of the group directly connected to the router.
R -set on an (S, G) by the receipt of an (S, G) RP bit prune message.
F -This indicates that this router is a FHR and send register messages to RP to inform RP of this active source
P - OIL list is NULL. That means the router will send a prune.
T - At least one packet received via SPT.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-16 21:38:56 -07:00
saravanank
ccf696e85f pimd: Do not allow to configure multicast on more than MAXVIF interfaces
RCA: When configured more than 32(MAXVIS), the inerfaces that are configured
after 32nd interfaces have the value of MAXVIF.
This is used as index to access the free vif tracker of array size 32(MAXVIFS).
So the channel oil list pointer which is present as the next field in pim structure get corrupt, when updating free vif.
This gets accessed during rpf update resulting in crash.

Fix: Refrain from allocating mcast interface structure and throw config error when more than MAXVIFS are attempted to configure.
Max vif checks are exempted for vrf device and pimreg as vrf device will be the first interface and not expected to fail and pimreg has reserved vif.
vxlan tunnel termination device creation has this check and throw warning on max vif.
All other creation are through CLI.

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-03-16 19:49:18 -07:00
saravanank
36afe48622 pimd: show ip pim bsr json output - removing vtysh caption
Root cause: The header display is put in common outside the vtysh/json if-else.
Fix: Brought inside vtysh condition.

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-03-15 18:58:53 -07:00
Russ White
7f6c322d50
Merge pull request #5839 from donaldsharp/upstream_merge
Upstream merge of missed MLAG code
2020-03-09 15:34:18 -04:00
Donald Sharp
5cb1323595
Merge pull request #5942 from patrasar/2438087
pimd: Display mroute uptime per (s,g) entry
2020-03-09 08:47:10 -04:00
Sarita Patra
dfd12d0255 pimd: Display mroute uptime per (s,g) entry
Issue: show ip mroute displays the mroute uptime (time when
mroute installed into the kernel) per oif.
This is confusing.

Fix: Display mroute uptime per (s,g) mroute entry.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-09 00:30:34 -07:00
Donald Sharp
f4e74bd038 pimd: Add ip pim register-accept-list PLIST command
When pim receives a register packet, we will apply the
received source to the prefix list.  If accepted normal
processing continues.  If denied we will send a register
stop message to the source.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 16:27:01 -05:00
Donald Sharp
1c4e26bc06 pimd: Rename the PIM_SPT_PLIST_NAME to PIM_PLIST_NAME
The memory type PIM_SPT_PLIST_NAME is specific to
SPT but we are going to store more prefix-list names
in pim, make it generic to allow for less confusion
in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 16:24:21 -05:00
Donald Sharp
17823cdd2c pimd: Add accidently missed code during upstreaming process
There was some code missed during the upstreaming process
due to code squash.  Identify and put into a commit
to keep code consistent and correct.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 16:02:52 -05:00
Donald Sharp
5e81f5dd1a *: Finish off the __PRETTY_FUNCTION__ to __func__
FINISH IT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 09:23:22 -05:00
Donatas Abraitis
15569c58f8 *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__
Just keep the code cool.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-05 20:23:23 +02:00
Russ White
30ac36dbfc
Merge pull request #5897 from patrasar/2415676
pimd: fix crash seen while executing igmp related configuration
2020-03-03 09:35:43 -05:00
Sarita Patra
4f007a5a03 pimd: fix crash seen while executing igmp related configuration
Issue 1:
1. Enable pim on an interface.
2. Configure query-interval or query max response time,
which results in pimd crash.

Root cause:
1. When pim is enabled on an interface, it creates a igmp socket
with querier_timer and other_querier time as NULL.
2. When query-interval/max_response_time is configured, it call the
function igmp_sock_query_reschedule() to reshedule the query. This
function check either of querier_timer or other_querier timer should
be running. Since in this case both are NULL, it results in crash.

Issue 2:
1. Enable pim on an interface.
2. Execute no ip igmp query-interval or query max response time,
which results in pimd crash.

Root cause:
1. When pim is enabled on an interface, it creates a pim interface
with querier_timer and other_querier time as NULL.
2. When no ip igmp query-interval/max_response_time is executed, it will
check either of querier_timer or other_querier timer should be running.
Since in this case both are NULL, it results in crash.

Fix:
When pim is enabled on an interface, it creates a igmp socket with
mtrace_only as true. So add a check if mtrace_only is true, then don't
reshedule the query.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-03-03 03:35:43 -08:00
Donald Sharp
7f5818fbd6 *: change hash_backet to hash_bucket
It's been a year search and destroy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-02-28 13:59:13 -05:00
Jafar Al-Gharaibeh
4d67e75282 Revert "*: change hash_backet to hash_bucket"
This reverts commit 3895c42a2e.

LabN CI update needs to be coordinated before merging this

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2020-02-27 09:52:02 -06:00
Donald Sharp
3895c42a2e *: change hash_backet to hash_bucket
It's been a year search and destroy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-02-26 20:03:34 -05:00
Mark Stapp
6c1b7a8c49 pimd: fix SA reports
Fix a couple of SA warnings introduced recently; replace some
'strcpy' calls.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-02-20 11:32:32 -05:00
Anuradha Karuppiah
f80427e9e7 pimd: pim mlag show commands
1. show ip pim mlag summary
provides MLAG session information and stats
2. show ip pim mlag upstream
displays the upstream entries synced across the MLAG switches

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-02-14 09:18:30 -08:00
Anuradha Karuppiah
448139e704 pimd: stop overloading SRC_IGMP upstream for vxlan local membership
A local membership is created on the vxlan termination device ipmr-lo. This
is done to -
1. Pull multicast vxlan tunnel traffic to the VTEP for termination by
triggering JoinDesired on the BUM multicast group.
2. Include the OIF in the mroute to signal to the dataplane component
that flow needs to be vxlan terminated.

Earlier we were overloading the PIM_UPSTREAM_FLAG_MASK_SRC_IGMP for
this local membership creation but that is creating confusion both in
the state machine and in the show outputs. To avoid that we use the
more apparent PIM_UPSTREAM_FLAG_MASK_SRC_VXLAN_TERM. With this change -
1. We get LHR functionality for VXLAN_TERM mroutes
2. OIF is populated with PIM_OIF_FLAG_PROTO_PIM only

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-02-14 09:18:30 -08:00
Anuradha Karuppiah
05ca004b80 pim: DF election for tunnel termination mroutes in an anycast-VTEP setup
1. Upstream entries associated with tunnel termination mroutes are
synced to the MLAG peer via the local MLAG daemon.
2. These entries are installed in the peer switch (via an upstream
ref flag).
3. DF (Designated Forwarder) election is run per-upstream entry by both
the MLAG switches -
a. The switch with the lowest RPF cost is the DF winner
b. If both switches have the same RPF cost the MLAG role is
used as a tie breaker with the MLAG primary becoming the DF
winner.
4. The DF winner terminates the multicast traffic by adding the tunnel
termination device to the OIL. The non-DF suppresses the termination
device from the OIL.

Note: Before the PIM-MLAG interface was available hidden config was
used to test the EVPN-PIM functionality with MLAG. I have removed the
code to persist that config to avoid confusion. The hidden commands are
still available.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-02-14 09:18:30 -08:00
Donatas Abraitis
975a328e2e *: Replace s_addr 0 => INADDR_ANY
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-02-06 09:00:12 +02:00
Donald Sharp
dd3364cb1a pimd: Convert the upstream_list and hash to a rb tree
Convert the upstream_list and hash to a rb tree, Significant
time was being spent in the listnode_add_sort.  This reduces
this time greatly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-01-03 08:39:55 -05:00
Donald Sharp
7315ecdabe pimd: Convert the channel_oil_list|hash to a rb_tree
The channel_oil_list and hash are taking significant
cpu at scale when adding to the sorted list.  Replace
with a RB_TREE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-01-03 08:39:55 -05:00
Jafar Al-Gharaibeh
e57cc5f056 pimd: refactor ip mroute cmd
combine:
  ip mroute INTERFACE A.B.C.D
  ip mroute INTERFACE A.B.C.D A.B.C.D

into:
  ip mroute INTERFACE A.B.C.D [A.B.C.D]

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2019-12-20 17:04:03 -06:00
Donald Sharp
4e29b89aba
Merge pull request #5427 from liam-mcb/igmp-join-any
pimd: Add command to join any-source multicast.
2019-12-16 07:47:41 -05:00
Liam McBirnie
771ce8ad24 pimd: Add command to join any-source multicast.
Allow 'ip igmp join' to join group for any source if no source is
specified.
Disallow joining source "0.0.0.0" as it is used to define an
any-source multicast group.

Signed-off-by: Liam McBirnie <liam.mcbirnie@boeing.com>
2019-12-12 13:09:46 +01:00
Jafar Al-Gharaibeh
94c1ae82da
Merge pull request #5355 from AnuradhaKaruppiah/pim-state-machine-fixes
PIM state machine fixes
2019-12-06 17:47:07 -06:00
Mark Stapp
07e123defc
Merge pull request #5328 from satheeshkarra/pim_mlag
pimd, lib, zebra : PIM MLAG Support
2019-11-22 08:51:47 -05:00
Anuradha Karuppiah
075a475e0c pimd: fixup whitespace errors reported by CI
No functional changes.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-20 13:32:08 -08:00
Donald Sharp
0f39cb4cb9 pimd: Create pimreg interface when we start any interface config
When you configure interface configuration without explicitly
configuring pim on that interface, we were not creating the pimreg
interface and as such we would crash in an attempted register
since the pimreg device is non-existent.

The crash is this:
==8823== Invalid read of size 8
==8823==    at 0x468614: pim_channel_add_oif (pim_oil.c:392)
==8823==    by 0x46D0F1: pim_register_join (pim_register.c:61)
==8823==    by 0x449AB3: pim_mroute_msg_nocache (pim_mroute.c:242)
==8823==    by 0x449AB3: pim_mroute_msg (pim_mroute.c:661)
==8823==    by 0x449AB3: mroute_read (pim_mroute.c:707)
==8823==    by 0x4FC0676: thread_call (thread.c:1549)
==8823==    by 0x4EF3A2F: frr_run (libfrr.c:1064)
==8823==    by 0x40DCB5: main (pim_main.c:162)
==8823==  Address 0xc8 is not stack'd, malloc'd or (recently) free'd

pim_register_join calls pim_channel_add_oif with:

	pim_channel_add_oif(up->channel_oil, pim->regiface,
			    PIM_OIF_FLAG_PROTO_PIM);

We just need to make srue pim->regiface exists once we start configuring
pim.

Fixes: #5358
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-11-18 11:43:52 -05:00
Anuradha Karuppiah
8ff637c8c9 pimd: bring back "show ip pim upstream-join-desired"
It is now used to evaluate and display join-desired state for
each upstream entry -
root@spine-1:~# net show pim upstream-join-desired
Source          Group           EvalJD
*               239.1.1.111     yes
6.0.0.28        239.1.1.111     yes
6.0.0.29        239.1.1.111     no
6.0.0.30        239.1.1.111     yes

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15 14:16:08 -08:00
Anuradha Karuppiah
5c9a72ef47 pimd: rename the upstream-join-desired command to "show ip pim channel"
This re-naming was needed because the JD state on an upstream is
not just based on channel info i.e. we can have JD=true even if there
is no downstream channel. The "show ip upstream-join-desired" command
will be changed to display that info i.e. upstream's JD state instead
of downstream channel params. The downstream channel params are now
available via "show ip pim channel"

PS: This change maybe reverted if upstream NAKs it. But there is a
pressing need for it to debug some not-so-reproduible problems.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15 14:16:08 -08:00
Anuradha Karuppiah
60eb7e6b80 pimd: enforce PIM_ENFORCE_LOOPFREE_MFC at the time of MFC programming
This is needed for two reasons -
1. The inherited OIL needs to be setup independent of the RPF interface
to allow correct computation of the JoinDesired macro.
2. The RPF interface is computed at the time of MFC programming so
it is not possible to permanently evict the OIF at that time oif_add

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15 14:16:08 -08:00
Anuradha Karuppiah
87b7cd5bc7 pimd: display the per-RPF neighbor join-prune agg list
root@leaf-12:~# vtysh -c "show ip pim jp-agg"
Interface        RPF Nbr         Source          Group           State
swp1             6.0.0.26        *               239.1.1.111         J
swp1             6.0.0.26        *               239.1.1.112         J
swp1             6.0.0.26        *               239.1.1.113         J
swp1             6.0.0.26        *               239.1.1.114         J
root@leaf-12:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15 14:16:08 -08:00
Anuradha Karuppiah
9929a2a9af pimd: display changes to indicate if a SG entry is still on the RPT
Sample output -
root@leaf-12:~# net show pim state
Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
Active Source           Group            RPT  IIF               OIL
1      *                239.1.1.111      y    swp1              swp3( J   )
1      6.0.0.28         239.1.1.111      y    swp1
1      *                239.1.1.112      y    swp1              swp3( J   )
1      6.0.0.28         239.1.1.112      y    swp1
1      *                239.1.1.113      y    swp1              swp3( J   )
1      6.0.0.28         239.1.1.113      y    swp1
1      *                239.1.1.114      y    swp1              swp3( J   )
1      6.0.0.28         239.1.1.114      y    swp1
root@leaf-12:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15 12:00:29 -08:00
Anuradha Karuppiah
5923b7396e pimd: MUTE flag to suppress traffic forwarding on non-DF
If an mroute loses DF election (with the MLAG peer) it has to stop
forwarding traffic on active-active devices such as ipmr-lo used
for vxlan traffic termination. To acheive that this commit
introduces a concept of OIF muting. That way we can let the PIM and
IGMP state machines play out and silence OIFs after the fact.

Relevant outputs:
=================
1. muted OIFs are displayed with the M flag in "pim state" -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@TORC12:~# net show pim state |grep "27.0.0.13"|grep 100
1         27.0.0.13        239.1.1.100      uplink-1          ipmr-lo(   *M)
root@TORC12:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2. And supressed altogether in the mroute output -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@TORC12:~# net show mroute |grep "27.0.0.13"|grep 100
27.0.0.13       239.1.1.100     none   uplink-1         none             0    --:--:--
root@TORC12:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-15 09:16:15 -08:00
Satheesh Kumar K
36b5b98fef pimd : Add support for MLAG Register & Un-register
when ever a FRR Client wants to send any data to another node
using MLAG Channel, uses below mechanisam.

1. sends  a MLAG Registration to zebra with interested messages that
   it is intended to receive from peer.
2. In response to this request, Zebra opens communication channel with
   MLAG. and also in Rx. diretion zebra forwards only those messages which
   client shown interest during registration
3. when client is no-longer interested in communicating with MLAG, client
   posts De-register to Zebra
4. if this is the last client which is interested for MLAG Communication,
   zebra closes the channel.

why PIM Needs MLAG Communication
================================
1. In general on LAN Networks elecetd DR will send the Join towards
   Multicast RP in case of a LHR and Register in case of FHR.
2. But in case DR Goes down, traffic will be re-converged only after
   the New DR is elected, but this can take time based on Hold Timer to
   detect the DR down.
3. this can be optimised by using MLAG Mecganisam.
4. and also Traffic can be forwarded more efficiently by knowing the cost
   towards RP using MLAG

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
2019-11-13 19:46:52 -08:00
Donald Sharp
3b13a2ccc1 pimd: Duplicate config is not a CMD_WARNING_CONFIG_FAILED
When you enter:
ip pim ssm prefix-list my-custom-ssm-range
ip pim ssm prefix-list my-custom-ssm-range

The second instance would cause a failure to happen which
should not happen w/ duplicate config.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-29 21:37:30 -04:00
Donald Sharp
253283d742 pimd: result was already tested against PIM_GROUP_BAD_ADDR_MASK_COMBO
The result variable was already tested against PIM_GROUP_BAD_ADDR_MASK_COMBO
earlier in the function.  No need to do the same thing twice.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-25 07:07:49 -04:00
Quentin Young
6a597223d3 Revert "Merge pull request #4885 from satheeshkarra/pim_mlag"
This reverts commit d563896dad, reversing
changes made to 09ea1a4038.
2019-10-14 17:15:09 +00:00
Satheesh Kumar K
4bf3dda597 pimd : Add support for MLAG Register & Un-register
when ever a FRR Client wants to send any data to another node
using MLAG Channel, uses below mechanisam.

1. sends  a MLAG Registration to zebra with interested messages that
   it is intended to receive from peer.
2. In response to this request, Zebra opens communication channel with
   MLAG. and also in Rx. diretion zebra forwards only those messages which
   client shown interest during registration
3. when client is no-longer interested in communicating with MLAG, client
   posts De-register to Zebra
4. if this is the last client which is interested for MLAG Communication,
   zebra closes the channel.

why PIM Needs MLAG Communication
================================
1. In general on LAN Networks elecetd DR will send the Join towards
   Multicast RP in case of a LHR and Register in case of FHR.
2. But in case DR Goes down, traffic will be re-converged only after
   the New DR is elected, but this can take time based on Hold Timer to
   detect the DR down.
3. this can be optimised by using MLAG Mecganisam.
4. and also Traffic can be forwarded more efficiently by knowing the cost
   towards RP using MLAG

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
2019-09-16 20:11:01 -07:00
Quentin Young
33b58e536f pimd: fix some help strings
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-07-06 00:15:27 +00:00
Quentin Young
2951a7a4c2 *: s/TRUE/true/, s/FALSE/false/
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-07-01 17:26:05 +00:00
Rafael Zalamena
9b2d87406a
Merge pull request #4525 from donaldsharp/some_cleanups
Some cleanups
2019-06-25 16:06:57 -03:00
David Lamparter
18130847e6
Merge pull request #4520 from rgirada/fix_clear_mroute
pimd: Added cli to generate igmp query.
2019-06-25 14:06:13 +02:00
rgirada
6741a5bb4e pimd: Added cli to generate igmp query.
Fix details :
Added a utility cli to generate a igmp query on an interface.
This won't impact the existing query generation based on the
general query interval.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2019-06-24 03:15:10 -07:00
Donald Sharp
a36898e755
Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
Donald Sharp
a12bb225a6
Merge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2
Ospf missing interface handling 2
2019-06-22 13:35:45 -04:00
Donald Sharp
11884868d4 pimd: ALLOC functions cannot fail.
There is no need to check for ALLOC function failures
in the code base.  If we cannot get more memory we
assert.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-19 19:07:12 -04:00
David Lamparter
3779776a39 lib/clippy: error out on unsupported bits
clippy can't process #ifdef or similar bits inside of an argument list
(e.g. within the braces of a DEFUN or DEFPY statement.)  Improve error
reporting to catch these cases instead of generating broken C code.

Fixes: #3840
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-12 19:22:59 +02:00
Philippe Guibert
f11e98eca3 *: change if_lookup_by_name() api with vrf
the vrf_id parameter is replaced by struct vrf * parameter.
this impacts most of the daemons that look for an interface based on the
name and the vrf identifier.
Also, it fixes 2 lookup calls in zebra and sharpd, where the vrf_id was
ignored until now.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-06-12 08:37:54 +02:00
Russ White
51e6f92ec6
Merge pull request #4494 from donaldsharp/no_src_for_you
pimd: The PIM_OIF_FLAG_PROTO_SRC flag was never used
2019-06-11 08:13:04 -04:00
Donald Sharp
11e0acfba5 pimd: The PIM_OIF_FLAG_PROTO_SRC flag was never used
Nor should it be.  So remove from system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-08 07:30:36 -04:00
Donald Sharp
9a8a7b0ed1 lib, pimd, sharpd: Various output string cleanups
Various compilers in our CI system were complaining about various
auto-conversions.  Let's get these cleaned up a bit more.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-07 09:29:45 -04:00
Russ White
230dec1398
Merge pull request #4452 from donaldsharp/mroute_count
pim: Add `clear ip mroute [vrf NAME] count` command
2019-06-04 09:16:34 -04:00
Donald Sharp
cd333cf968 pimd: Add clear ip mroute [vrf NAME] count command to pim
When debugging a large number of mroutes and data is changing
fast it is sometimes hard to know what has actually changed.
Add a `clear ip mroute count` command that resets the last
data points gathered and allows you to see what has changed
since the last clear.

Output:
donna.cumulusnetworks.com# show ip mroute count

Source          Group           LastUsed Packets Bytes WrongIf
*               224.0.1.60      272      0       0          0
10.50.11.11     239.255.255.250 2        1       203        1
10.50.11.13     239.255.255.250 66       1       203        1
10.50.11.100    239.255.255.250 68       1       203        1
10.50.11.114    239.255.255.250 62       2       406        1
10.50.11.129    239.255.255.250 10       1       199        1
10.50.11.143    239.255.255.250 44       1       203        1
10.50.11.144    239.255.255.250 44       1       203        1
10.50.11.156    239.255.255.250 66       1       203        1
10.50.11.235    239.255.255.250 149      0       0          0
10.50.11.246    239.255.255.250 54       5       965        1
donna.cumulusnetworks.com# clear ip mroute count
donna.cumulusnetworks.com# show ip mroute count

Source          Group           LastUsed Packets Bytes WrongIf
*               224.0.1.60      279      0       0          0
10.50.11.11     239.255.255.250 9        0       0          0
10.50.11.13     239.255.255.250 73       0       0          0
10.50.11.100    239.255.255.250 76       0       0          0
10.50.11.114    239.255.255.250 69       0       0          0
10.50.11.129    239.255.255.250 17       0       0          0
10.50.11.143    239.255.255.250 51       0       0          0
10.50.11.144    239.255.255.250 51       0       0          0
10.50.11.156    239.255.255.250 73       0       0          0
10.50.11.235    239.255.255.250 156      0       0          0
10.50.11.246    239.255.255.250 61       0       0          0
donna.cumulusnetworks.com# show ip mroute count

Source          Group           LastUsed Packets Bytes WrongIf
*               224.0.1.60      300      0       0          0
10.50.11.11     239.255.255.250 30       0       0          0
10.50.11.13     239.255.255.250 94       0       0          0
10.50.11.100    239.255.255.250 96       0       0          0
10.50.11.114    239.255.255.250 90       0       0          0
10.50.11.119    239.255.255.250 7        1       203        1
10.50.11.127    239.255.255.250 3        2       406        1
10.50.11.129    239.255.255.250 38       0       0          0
10.50.11.143    239.255.255.250 72       0       0          0
10.50.11.144    239.255.255.250 72       0       0          0
10.50.11.156    239.255.255.250 94       0       0          0
10.50.11.197    239.255.255.250 2        1       200        1
10.50.11.235    239.255.255.250 177      0       0          0
10.50.11.246    239.255.255.250 82       0       0          0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-03 11:16:00 -04:00
Donald Sharp
fbd74c7d94 pimd: Convert strncpy to strlcpy in pim_cmd.c
A couple of places of strncpy snuck in due to my confusion
about if Quentin's earlier change had gotten in.  Just some
code in flux.  This should fix the issue/warnings in our
CI system.
2019-06-03 10:09:22 -04:00
Donald Sharp
ed7e15589d pimd: Remove unused functions
Recent commits rewrote the `clear mroute` command and this caused
these two two functions to no longer be used, remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-03 08:38:38 -04:00
Donald Sharp
b97480c548
Merge pull request #4274 from rgirada/fix_clear_mroute
pimd: Re-deisgn the "clear ip mroute" command.
2019-06-03 07:39:04 -04:00
Donald Sharp
008def8643
Merge pull request #4369 from patrasar/lmqc_lmqt
pimd: new cli to configure last-member-query-count & last-member-quer…
2019-05-30 21:23:11 -04:00
Sarita Patra
59115451a8 pimd: new cli to configure last-member-query-count & last-member-query-interval
Introduce new cli commands ip igmp last-member-query-count <1-7>
ip igmp last-member-query-interval <1-255> deciseconds.

Display the config in show running config and show ip igmp interface

Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-05-29 20:36:16 -07:00
Renato Westphal
0ad79902fc
Merge pull request #4267 from qlyoung/fix-misc-compile-warnings
Fix misc compile warnings, remove strcpy & strcat
2019-05-29 23:55:17 -03:00
Quentin Young
c35b7e6bea pimd: strcpy -> strlcpy
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-29 18:03:26 +00:00
Sarita Patra
468b6f4400 pimd: new cli command show ip mroute summary
Introduced a new command "show ip mroute summary"
to display total number of (*, G) and (S, G) mroutes
created and number of mroutes installed in the kernel.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-05-29 08:44:22 -07:00
rgirada
4a5e6e7416 pimd: Re-deisgn the "clear ip mroute" command.
Made changes to clean up the all upstreams and ifchannels
in FRR apart from cleanup datapath mroutes when this command
issued.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2019-05-28 22:39:32 -07:00
Jafar Al-Gharaibeh
bda0241599
Merge pull request #4239 from sarav511/rp
pimd: PIM Bootstrap Message Processing
2019-05-28 10:26:28 -05:00
saravanank
5164ad1e98 pimd: clear pim bsm traffic counters for BSM
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 21:42:22 -07:00
saravanank
415f63501b pimd: Implement show & clear ip pim statistics command
This would show only bsm related statistics for now.
We shall add more statistics to this later.

Sw3# show ip pim statistics
BSM Statistics :
----------------
Number of Received BSMs : 1584
Number of Forwared BSMs : 793
Number of Dropped BSMs  : 1320

Interface : ens192
-------------------
Number of BSMs dropped due to config miss : 0
Number of unicast BSMs dropped : 0
Number of BSMs dropped due to invalid scope zone : 0

Interface : ens224
-------------------
Number of BSMs dropped due to config miss : 0
Number of unicast BSMs dropped : 0
Number of BSMs dropped due to invalid scope zone : 0

Interface : ens256
-------------------
Number of BSMs dropped due to config miss : 0
Number of unicast BSMs dropped : 0
Number of BSMs dropped due to invalid scope zone : 0

Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 21:42:22 -07:00
saravanank
321295c1d7 pimd: Implementation of show ip pim bsrp-info.
This command displays the group to rp mappings received from BSR.

Sw3# show ip pim bsrp-info
BSR Address  30.0.0.100
Group Address 225.1.1.1/32
--------------------------
Rp Address      priority        Holdtime        Hash
(ACTIVE)
20.0.0.2        0               150             1533588312
2.2.2.2         0               150             1524600152
9.9.9.10        0               150             1489835248
7.7.2.7         0               150             1230207135
7.2.2.7         0               150             1093826719
7.7.9.7         0               150             897086367
7.8.9.10        0               150             811603184
7.5.2.7         0               150             746158239
9.10.9.10       0               150             658117872
(PENDING)
Pending RP count :0
Partial List is empty.

Group Address 226.1.1.1/32
--------------------------
Rp Address      priority        Holdtime        Hash
(ACTIVE)
9.9.9.9         0               150             326773161
(PENDING)
Pending RP count :0
Partial List is empty.

Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 21:42:22 -07:00
saravanank
0d1a4e24c2 pimd: Implement show ip pim bsm-database
This command shows all the fragments of the last received preferred BSM.
This displayed in readable format.

Sw3# sh ip pim bsm-database
Scope Zone: Global
Number of the fragments: 1

BSM Fragment : 1
------------------
BSR-Address     BSR-Priority    Hashmask-len    Fragment-Tag
30.0.0.100      0               0               3289

Group : 225.1.1.1/32
-------------------
Rp Count:9
Fragment Rp Count : 9
RpAddress     HoldTime     Priority
20.0.0.2        150          0
2.2.2.2         150          0
9.9.9.10        150          0
7.7.2.7         150          0
7.2.2.7         150          0
7.7.9.7         150          0
7.8.9.10        150          0
7.5.2.7         150          0
9.10.9.10       150          0

Group : 226.1.1.1/32
-------------------
Rp Count:1
Fragment Rp Count : 1
RpAddress     HoldTime     Priority
9.9.9.9         150          0

Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 21:42:22 -07:00
saravanank
256392ebfd pimd: Implementation of show ip pim bsr command
Command to display current bsr, last received bsm ts, bsr uptime

Sw3# sh ip pim bsr
PIMv2 Bootstrap information
Current preferred BSR address: 30.0.0.100
Priority        Fragment-Tag       State           UpTime
  0               6390            ACCEPT_PREFERRED    91:26:24
Last BSM seen: 00:00:37

Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 21:37:27 -07:00
saravanank
d0e418b42c pimd: rp_new & rp_del split into 2 tier functions & implement rp_change
pim_rp_new split into pim_rp_new_config and pim_rp_new.
pim_rp_new_config is called by CLI.
pim_rp_new will be called by pim_rp_new_config and bsm rp config.

pim_rp_del is split into pim_rp_del_config and pim_rp_del
pim_rp_del_config is called by CLI.
pim_rp_del is called by pim_rp_del_config and bsm rp config

Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 21:35:45 -07:00
saravanank
16c926c85d pimd: interface commands to enable/disable bsm processing
(intf)ip pim bsm - to enable bsm processing on the interface
(intf)no ip pim bsm - to disable bsm processing on the interface
(intf)ip pim unicast-bsm - to enable ucast bsm processing on the interface
(intf)no ip pim unicast-bsm - to disable ucast bsm processing on the interface

Note: bsm processing and ucast bsm processing is enabled by default on a
pim interface. The CLI is implemented as a security feature as recommended by
RFC 5059

Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 20:23:15 -07:00
saravanank
4616b2e981 pimd: cli changes to show BSM statistics in show ip pim int traffic
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 20:23:15 -07:00
saravanank
09524ccfb0 pimd: implement debug pim bsm command
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14 20:23:15 -07:00
Donald Sharp
859ea2dea0 pimd: Stop crash in show of single interface
There exists a possiblity that we have upstream data but
at this point in time the rpf failed because there is no
path.  As such the rpf interface will be NULL and we
should not necessarily trust it.  Prevent a crash

Ticket: CM-24857
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-05-02 10:37:04 -04:00
Donald Sharp
e134b399bd pimd: Add missing flags to json output
the json code has not been updated since a variety of new flags have
been added to the code base.  Add those flags in so we can tell
what is going on sometimes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-23 22:01:44 -04:00
Donald Sharp
c23c1d3957 pimd: Add ability to select on S or G for show ip mroute
Add the ability to select on a S or G for a `show ip mroute`
command.

show ip mroute 225.1.1.111
show ip mroute 4.5.6.7 225.1.1.111

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-22 19:51:20 -04:00
Jafar Al-Gharaibeh
c6f637132f
Merge pull request #4025 from AnuradhaKaruppiah/pim-evpn
pim-evpn: Forwarding overlay BUM traffic via multicast VxLAN tunnels in the underlay
2019-04-22 11:44:52 -05:00
Anuradha Karuppiah
7c85225cf5 pimd: hidden command to set MLAG parameters
The MLAG component on the switch is expected to provide some
properties (such as peerlink-rif) to bootstrap the anycast-VTEP
functionality. The final interface for this is being defined as
a part of the pim-mlag functionality.

This commit provides a hidden command to test the anycast-VTEP
functionality independent of the MLAG component.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20 08:33:23 -07:00
Anuradha Karuppiah
f1e2901a0f pimd: display commands for the pim-vxlan-sg database and worklist
Sample output:
root@TORS1:~# vtysh -c "show ip pim vxlan-groups"
Codes: I -> installed
Source          Group           Input           Output          Flags
27.0.0.7        239.1.1.101     lo                              I
*               239.1.1.100     -               ipmr-lo         I
*               239.1.1.101     -               ipmr-lo         I
27.0.0.7        239.1.1.100     lo                              I
root@TORS1:~#

root@TORS1:~# vtysh -c "show ip pim vxlan-work"
Codes: I -> installed
Source          Group           Input           Flags
27.0.0.7        239.1.1.100     lo                              I
PS: note the worklist dump is a hidden command

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20 08:33:23 -07:00
Anuradha Karuppiah
4d913fa62e pimd: cli changes for pim-debug-vxlan
Sample:
root@TORC12:~# vtysh -c "show run" |grep "debug pim vxlan"
debug pim vxlan
root@TORC12:~# vtysh -c "show debug" |grep "pim vxlan"
debug pim vxlan
root@TORC12:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20 08:33:23 -07:00
Anuradha Karuppiah
b1891fa084 pimd: API for enabling pim on the vxlan term device ipmr-lo
ipmr-lo is a dummy netdev with no additional addressing requirements -
root@TORS1:~# ip -d link show ipmr-lo
28: ipmr-lo: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/ether 12:5a:ae:74:51:a2 brd ff:ff:ff:ff:ff:ff promiscuity 0
    dummy addrgenmode eui64
root@TORS1:~#

This device is used by pim-vxlan to signify multicast-vxlan-tunnel
termination.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20 08:33:21 -07:00
Anuradha Karuppiah
ee31c9fd1a pimd: add new OIF type in prep for vxlan support
In an anycast VTEP setup the peerlink-rif (ISL) is added as a OIF to the
tunnel origination mroute. A new OIF protocol, VxLAN, has been added to
allow that functionalty.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-04-20 08:33:21 -07:00
Donald Sharp
6de45bcc61 pimd: Add ability to select join S,G for 'show ip pim join`
Add a bit of code to allow us to look at specified S,G for
the upstream available to us.

If one item is listed we assume Group, if both we assume Source
then Group.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-18 16:36:10 -04:00
Donald Sharp
dff5cedb56 pimd: Add ability to select upstream on S,G for show ip pim upstream
Add a bit of code to allow us to look at specified S,G for
the upstreams available to us.

If one item is listed we assume Group, if both we assume Source then
Group.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-18 16:36:10 -04:00
Russ White
0697abef9d
Merge pull request #4096 from donaldsharp/pim_nht_cleanup
Pim nht cleanup
2019-04-16 10:27:35 -04:00
Mark Stapp
35a1272051 pimd: use debug pim static
Replace cli 'debug static' with 'debug pim static', to make
the 'debug static' node available for staticd (eventually).

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-04-11 11:46:40 -04:00
Donald Sharp
43763b11d0 pimd: Tracking of RPF is *separate* from the lookup
Start the separation of tracking a Destination from the act
of looking it up.  The cojoining of these two concepts led
to a bunch of code that had to think about both problems leading
to weird situations and code paths.  Simplify the code by making
pim_ecmp_nexthop_search a static function and we only ever
call pim_ecmp_nexthop_lookup when we need to do a RPF().

pim_ecmp_nexthop_lookup will now attempt to find a stored pnc
and if it finds one it will report on the answer from it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-05 11:12:59 -04:00
Lou Berger
e9890df15d
Merge pull request #4073 from donaldsharp/undebug_me_or_not
some cleanup across multiple daemons
2019-04-04 10:08:34 -04:00
Jafar Al-Gharaibeh
dbf2f94c2c
Merge pull request #4060 from donaldsharp/pim_cherrybomb
Pim cherrybomb
2019-04-03 23:02:32 -05:00
Donald Sharp
fb09579ef7 bgpd, pimd: Remove undebug commands
The undebug XXX commands were deprecated over a year ago now,
time to nuke from on high.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-03 16:17:26 -04:00
Donald Sharp
ade155e146 pimd: pim_nexthop_lookup should return true/false
The current reverse logic led to this code construct
if (!pim_nexthop_lookup(...)) {
	//Do something successfull
}

This is backwards and will cause logic errors when people
use this code.  Fix to use true/false for success/failure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-02 08:20:36 -04:00
Sarita Patra
e7cd85bda7 pimd: Introduce mroute_creation in channel oil data structure
Issue: (*,G) mroute uptime is not updated in mroute table,
after deleting and adding the RP

Root cause: When RP gets deleted or becomes not reachable, then
we un-install the entry from the kernel, but still maintains the
entry in the stack. When  RP gets re-configured or becomes reachable,
"show ip mroute" shows the uptime, when the channel_oil gets created.

Fix: Introduce a new time mroute_creation in the channel_oil, gets
updated when mroute gets installed in the kernel.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-03-31 23:38:28 -07:00
Donald Sharp
ff415346e6 pimd: Interfaces can be upto 16 characters
The interface column in pim was limited to 8 or 9 columns
all over the place in pim, fix the code up to allow interface
length to be up to 16 columns.

Ticket: CM-23083
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-26 21:01:00 -04:00
Donald Sharp
a6170d839a
Merge pull request #3863 from patrasar/RP_addition_deletion_changes
Rp addition deletion changes
2019-03-20 18:31:01 -04:00
Donald Sharp
f116689efb pimd: Display drpriority as a unsigned int
There existed output code that used %d for a uint32_t
switch to a %u.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-15 11:32:41 -04:00
David Lamparter
6e727402bd
Merge pull request #3907 from donaldsharp/pim_election
pimd: Ensure DR election happens when both sides change prio
2019-03-11 19:41:10 +01:00
Donald Sharp
3de708125e pimd: Ensure DR election happens when both sides change prio
Suppose we have 2 routers A and B.  Both Router A and B have
the same priority of 1000.  Router A is the elected DR.
Now suppose B lowers his priority to 1.  He still looses the
DR election and we are not sending a hello with the new priority.
Immediately after this A's priority is also lowered to 1, it
looses the election and sends the hello.  B receives this hello
and elects A as the DR( since it has the better ip address)
At this point A believes B is the DR, and B believes A is the
DR until such time that the normal hello from B is sent to A,
which if timed correctly can be a significant amount of time).

This code just causes a hello to be sent if the priority is
changed.  Now both sides will be able to converge quickly

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-05 10:29:35 -05:00
Quentin Young
0a22ddfbb1 *: remove null check before XFREE
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25 23:00:46 +00:00
Tim Bray
e3b78da875 *: Rename backet to bucket
Presume typo from original author

Signed-off-by: Tim Bray <tim@kooky.org>
2019-02-25 16:22:36 +00:00
Sarita Patra
d8bed89dca pimd: Handling dummy upstream in "show ip pim upstream"
When FRR receives IGMP/PIM (*, G) join and RP is not configured or
not reachable, then we are creating a dummy upstream with incoming
interface as NULL.
Added some null checks for the incoming interface, while displaying
the pim upstream information in the cli command "show ip pim upstream".

Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-02-24 09:38:03 -08:00
Donald Sharp
70fd22bd03 pimd: Add 'test pim keepalive-reset A.B.C.D A.B.C.D' command
Add a test command to pim that allows you to reset the keepalive timer
for an upstream to it's max value.  This is to allow purposeful testing
of cleanup code in pim, by forcing the keeaplive timer to expire later.

robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:10 00:00:52  00:00:25  00:02:54       1
robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:11 00:00:51  00:00:24  00:02:53       1
robot# test pim keep 192.168.201.136 225.1.0.0
Setting (192.168.201.136,225.1.0.0) to current keep alive time: 210
robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:27 00:00:35  00:00:08  00:03:27       1
robot#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-20 19:26:05 -05:00
Sarita Patra
6b44b40141 pimd: reject inconsistent address/mask "ip pim rp command"
Issue: Configure "ip pim rp x.x.x.x 225.0.0.0/4".
Show running config shows "ip pim rp x.x.x.x 224.0.0.0/4"
This is mis-leading.

Root-cause: Internally 225.0.0.0/4 is getting converted to
224.0.0.0/4 group mask, since the prefix length is 4.

Fix: Restrict the user to configure inconsistent group address
mask by throughing a cli error "Inconsistent address and mask".

Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-02-08 01:35:21 -08:00
Donald Sharp
414d885aac pimd: Add hidden 'ip pim active-active` command
Add a command to track if an interface should be in active-active
mode or not.  This command is hidden at this time because it
is not finished fully.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-31 09:28:39 -05:00
Donald Sharp
afec9bba1e pimd: Allow pim to display what it believes the mlag role is.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04 12:23:40 -05:00
Donald Sharp
75373ccac4 pimd: Move packet_process variable to pim_router
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04 12:23:39 -05:00
Donald Sharp
2925dff513 pimd: Move register_suppress_time into struct pim router
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04 12:23:39 -05:00
Donald Sharp
da03883e1e pimd: Convert rpf_cache_refresh_delay_msec into pim_router struct
Move the rpf_cache_refresh_delay_msec into the pim_router since
it should own the data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04 12:23:39 -05:00
Donald Sharp
5b45753eff pimd: Convert qpim_t_periodic into the struct pim_router structure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04 12:23:39 -05:00
Donald Sharp
a0bf54c7de pimd: Add some extra information to a show command
The tracking of who have drpriority on an interface
in pim was not displayed anywhere.  Add to the show
command for future reference.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-21 10:17:48 -04:00
Donald Sharp
85a13586ed pimd: use bool instead of int to pass true/false
In pim_if_new use bool instead of an int to pass
true/false values for what we should create the
pim interface type for.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-17 14:09:06 -04:00
Donald Sharp
59752d4ea5 pimd: Actually create vif's in non-integrated config
The startup of a non-integrated config was not properly
allowing for startup to create the vif when we have
not learned about the interface we are trying to configure
at this point in time.  Actually notice when we are
trying to create a pimreg device or not to properly
notice when to attempt to create the vif or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-17 13:58:59 -04:00
Sarita Patra
eccdcfe2b6 pimd: fix indentation warnings
Signed-off-by: Sarita Patra <saritap@vmware.com>
2018-09-11 22:00:15 -07:00
root
2f5e937c49 pimd: create a new command "ip pim" configuring pim sm
A new command "ip pim" is created to configure pim sm on an
interface, which replaces the existing commands "ip pim sm"
and "ip pim ssm" and make "ip pim sm" and "ip pim ssm" as
hidden commands. The command "ip multicast-routing" is removed
since it is already enabled on FRR by default.

Signed-off-by: Sarita Patra saritap@vmware.com
2018-09-10 22:22:14 -07:00
Don Slice
088f109866 bgpd, ospfd, pimd, zebra: Convert more use_json locations to bool
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-09-04 17:39:04 +00:00
Don Slice
9f049418bc bgpd/ospfd: make bgp and ospf json response a bit more consistent
Problem reported that some bgp and ospf json commands did not return
any json output at all if the bgp/ospf instance did not exist.
Additionally, some bgp and ospf json commands did not return any json
output if the instance existed but no neighbors were defined.  This
fix makes these commands more consistent in returning empty braces for
json output and issue a message if not using json output.  Additionally,
made the flag "use_json" a bool to make it consistent since previously,
it had been defined as an int, char, u_char, and bool at various places.

Ticket: CM-21040
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-08-30 12:40:18 +00:00
David Lamparter
a2dc7057e0 *: fix gcc-8 format-overflow warnings
e.g.
pimd/pim_oil.c: In function ‘pim_channel_oil_dump’:
pimd/pim_oil.c:51:19: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Werror=format-overflow=]

Build on gcc-8.2.0 is warning-free after this patch.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-21 21:05:09 +02:00
Donald Sharp
7cd502014e pimd: Trust backet->data
The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 17:53:09 -04:00
Donald Sharp
d6853655b5
Merge branch 'master' into bfd-final 2018-08-14 08:16:10 -04:00
Donald Sharp
0ce1ca805d *: ALLOC calls cannot fail
There is no need to check for failure of a ALLOC call
as that any failure to do so will result in a assert
happening.  So we can safely remove all of this code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11 17:14:58 +02:00
Rafael Zalamena
64dc4b2d7a bgpd/ospf(6)d/pimd: hide BFD commands with timers
Don't show BFD commands with timers since it might confuse users
("show running-config" won't display timers in client daemons anymore),
but keep accepting this command from previous configurations.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-08 18:25:08 -03:00
Donald Sharp
b938537bdb pimd: Remove duplicate parameter to functions
Both pim_ecmp_nexthop_lookup and pim_ecmp_fib_lookup_if_vif_index
pass the address in 2 times.  Make function calls consistent
and just pass in the src once.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-07 10:15:02 -04:00
Donald Sharp
ab9ac14351 pimd: When doing nexthop-lookups don't allocate perm memory
When doing nexthop lookups do not permanently allocate
memory in zebra and pim to track the nexthop specified
on the cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-07 09:02:07 -04:00
Donald Sharp
db20e34f09 pimd: Use generated interface name
When we have a generated interface name, use it instead of the actual
pointer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-03 21:31:11 -04:00
paco
a2b6e694b1
bgpd isisd ldpd lib ospfd pimd: redundancy (infer)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-20 22:25:28 +02:00
Donald Sharp
4795fff748 pimd: Fix ecmp_enable and ecmp_rebalance_enable
These commands were being accepted in all vrf's and
affecting all vrf's behavior globally, since they were
global variables.

Modify the code to make these two commands work
on a per-vrf basis.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-07 10:23:32 -04:00
Mladen Sablic
21313cbfda pimd: show ip igmp statistics command
Command showing IGMP Rx statistics, useful for analyzing IGMP
activity on interfaces.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-05-04 17:05:19 +02:00
Quentin Young
ef7eec745d
bgpd, pim: remove undebug
This 'undebug' syntax is only used in 5 commands and serves no apparent
purpose.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-04-02 16:03:11 -04:00
Lou Berger
97610b589f
Merge pull request #1921 from donaldsharp/pim_stuff
Pim stuff
2018-03-30 12:03:33 -04:00
Quentin Young
d7c0a89a3a
*: use C99 standard fixed-width integer types
The following types are nonstandard:
- u_char
- u_short
- u_int
- u_long
- u_int8_t
- u_int16_t
- u_int32_t

Replace them with the C99 standard types:
- uint8_t
- unsigned short
- unsigned int
- unsigned long
- uint8_t
- uint16_t
- uint32_t

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-27 15:13:34 -04:00
Donald Sharp
bfc9201928 pimd: Move some data tracking variables per VRF
There were a few more global variables that needed to be per
vrf.  So move them over.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-17 21:34:55 -04:00
Donald Sharp
da11e32521 pimd: Make the rpf scan per vrf.
We know the vrf that we are in when we need to initiate a
rescan of the rpf cache.  So pass it in and use that information.
This should help the rescan at scale with several vrf's cutting
out a lot of unnecessary work.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-17 21:13:09 -04:00
Mladen Sablic
f83f396624 pimd: mtrace only IGMP sockets
Feature of mtrace only IGMP sockets on pim sm and pim
ssm interfaces. Modifed IGMP socket creation and show
igmp interface command output.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-03-08 09:40:48 +01:00
Lou Berger
3a6351a3d9 pimd: another change to keep indent.py happy
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06 14:09:19 -05:00
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