summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
AgeCommit message (Collapse)Author
2020-01-03pimd: Convert the channel_oil_list|hash to a rb_treeDonald Sharp
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>
2019-12-20pimd: refactor ip mroute cmdJafar Al-Gharaibeh
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-16Merge pull request #5427 from liam-mcb/igmp-join-anyDonald Sharp
pimd: Add command to join any-source multicast.
2019-12-12pimd: Add command to join any-source multicast.Liam McBirnie
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-06Merge pull request #5355 from AnuradhaKaruppiah/pim-state-machine-fixesJafar Al-Gharaibeh
PIM state machine fixes
2019-11-22Merge pull request #5328 from satheeshkarra/pim_mlagMark Stapp
pimd, lib, zebra : PIM MLAG Support
2019-11-20pimd: fixup whitespace errors reported by CIAnuradha Karuppiah
No functional changes. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2019-11-18pimd: Create pimreg interface when we start any interface configDonald Sharp
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-15pimd: bring back "show ip pim upstream-join-desired"Anuradha Karuppiah
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-15pimd: rename the upstream-join-desired command to "show ip pim channel"Anuradha Karuppiah
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-15pimd: enforce PIM_ENFORCE_LOOPFREE_MFC at the time of MFC programmingAnuradha Karuppiah
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-15pimd: display the per-RPF neighbor join-prune agg listAnuradha Karuppiah
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-15pimd: display changes to indicate if a SG entry is still on the RPTAnuradha Karuppiah
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-15pimd: MUTE flag to suppress traffic forwarding on non-DFAnuradha Karuppiah
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-13pimd : Add support for MLAG Register & Un-registerSatheesh Kumar K
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-10-29pimd: Duplicate config is not a CMD_WARNING_CONFIG_FAILEDDonald Sharp
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-25pimd: result was already tested against PIM_GROUP_BAD_ADDR_MASK_COMBODonald Sharp
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-14Revert "Merge pull request #4885 from satheeshkarra/pim_mlag"Quentin Young
This reverts commit d563896dada99f3474d428f928786cbfde936fee, reversing changes made to 09ea1a40386f02a13cdb0462cc55af0d03f0c277.
2019-09-16pimd : Add support for MLAG Register & Un-registerSatheesh Kumar K
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-07-06pimd: fix some help stringsQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-07-01*: s/TRUE/true/, s/FALSE/false/Quentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-06-25Merge pull request #4525 from donaldsharp/some_cleanupsRafael Zalamena
Some cleanups
2019-06-25Merge pull request #4520 from rgirada/fix_clear_mrouteDavid Lamparter
pimd: Added cli to generate igmp query.
2019-06-24pimd: Added cli to generate igmp query.rgirada
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-23Revert "Ospf missing interface handling 2"Donald Sharp
2019-06-22Merge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2Donald Sharp
Ospf missing interface handling 2
2019-06-19pimd: ALLOC functions cannot fail.Donald Sharp
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-12lib/clippy: error out on unsupported bitsDavid Lamparter
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*: change if_lookup_by_name() api with vrfPhilippe Guibert
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-11Merge pull request #4494 from donaldsharp/no_src_for_youRuss White
pimd: The PIM_OIF_FLAG_PROTO_SRC flag was never used
2019-06-08pimd: The PIM_OIF_FLAG_PROTO_SRC flag was never usedDonald Sharp
Nor should it be. So remove from system. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-06-07lib, pimd, sharpd: Various output string cleanupsDonald Sharp
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-04Merge pull request #4452 from donaldsharp/mroute_countRuss White
pim: Add `clear ip mroute [vrf NAME] count` command
2019-06-03pimd: Add `clear ip mroute [vrf NAME] count` command to pimDonald Sharp
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-03pimd: Convert strncpy to strlcpy in pim_cmd.cDonald Sharp
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-03pimd: Remove unused functionsDonald Sharp
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-03Merge pull request #4274 from rgirada/fix_clear_mrouteDonald Sharp
pimd: Re-deisgn the "clear ip mroute" command.
2019-05-30Merge pull request #4369 from patrasar/lmqc_lmqtDonald Sharp
pimd: new cli to configure last-member-query-count & last-member-quer…
2019-05-29pimd: new cli to configure last-member-query-count & last-member-query-intervalSarita Patra
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-29Merge pull request #4267 from qlyoung/fix-misc-compile-warningsRenato Westphal
Fix misc compile warnings, remove strcpy & strcat
2019-05-29pimd: strcpy -> strlcpyQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-29pimd: new cli command show ip mroute summarySarita Patra
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-28pimd: Re-deisgn the "clear ip mroute" command.rgirada
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-28Merge pull request #4239 from sarav511/rpJafar Al-Gharaibeh
pimd: PIM Bootstrap Message Processing
2019-05-14pimd: clear pim bsm traffic counters for BSMsaravanank
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: Implement show & clear ip pim statistics commandsaravanank
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-14pimd: Implementation of show ip pim bsrp-info.saravanank
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-14pimd: Implement show ip pim bsm-databasesaravanank
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-14pimd: Implementation of show ip pim bsr commandsaravanank
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-14pimd: rp_new & rp_del split into 2 tier functions & implement rp_changesaravanank
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>