summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
AgeCommit message (Collapse)Author
2019-02-24pimd: Handling dummy upstream in "show ip pim upstream"Sarita Patra
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-20pimd: Add 'test pim keepalive-reset A.B.C.D A.B.C.D' commandDonald Sharp
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-08pimd: reject inconsistent address/mask "ip pim rp command"Sarita Patra
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-01-31pimd: Add hidden 'ip pim active-active` commandDonald Sharp
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-04pimd: Allow pim to display what it believes the mlag role is.Donald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Move packet_process variable to pim_routerDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Move register_suppress_time into struct pim routerDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-04pimd: Convert rpf_cache_refresh_delay_msec into pim_router structDonald Sharp
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-04pimd: Convert qpim_t_periodic into the `struct pim_router` structureDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-21pimd: Add some extra information to a show commandDonald Sharp
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-17pimd: use bool instead of int to pass true/falseDonald Sharp
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-17pimd: Actually create vif's in non-integrated configDonald Sharp
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-11pimd: fix indentation warningsSarita Patra
Signed-off-by: Sarita Patra <saritap@vmware.com>
2018-09-10pimd: create a new command "ip pim" configuring pim smroot
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-04bgpd, ospfd, pimd, zebra: Convert more use_json locations to boolDon Slice
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-08-30bgpd/ospfd: make bgp and ospf json response a bit more consistentDon Slice
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-21*: fix gcc-8 format-overflow warningsDavid Lamparter
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-15pimd: Trust backet->dataDonald Sharp
The backet->data cannot be NULL, no need to check for it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-14Merge branch 'master' into bfd-finalDonald Sharp
2018-08-11*: ALLOC calls cannot failDonald Sharp
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-08bgpd/ospf(6)d/pimd: hide BFD commands with timersRafael Zalamena
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-07-07pimd: Remove duplicate parameter to functionsDonald Sharp
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-07pimd: When doing nexthop-lookups don't allocate perm memoryDonald Sharp
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-03pimd: Use generated interface nameDonald Sharp
When we have a generated interface name, use it instead of the actual pointer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-20bgpd isisd ldpd lib ospfd pimd: redundancy (infer)paco
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-06-07pimd: Fix ecmp_enable and ecmp_rebalance_enableDonald Sharp
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-05-04pimd: show ip igmp statistics commandMladen Sablic
Command showing IGMP Rx statistics, useful for analyzing IGMP activity on interfaces. Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-04-02bgpd, pim: remove undebugQuentin Young
This 'undebug' syntax is only used in 5 commands and serves no apparent purpose. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-30Merge pull request #1921 from donaldsharp/pim_stuffLou Berger
Pim stuff
2018-03-27*: use C99 standard fixed-width integer typesQuentin Young
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-17pimd: Move some data tracking variables per VRFDonald Sharp
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-17pimd: Make the rpf scan per vrf.Donald Sharp
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-08pimd: mtrace only IGMP socketsMladen Sablic
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-06pimd: another change to keep indent.py happyLou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-03-06*: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger
Signed-off-by: Lou Berger <lberger@labn.net>
2018-02-19pimd: Multicast traceroute client and routerMladen Sablic
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-01-30lib, pimd: Remove PIM_NODE as it is not neededDonald Sharp
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-08pimd: Allow use-source to return more subtle error codesDonald Sharp
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-03pimd: Add finer grain return codes for configurationDonald Sharp
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>
2017-10-30pimd: When doing a RPF for a route, note when we fail the lookupDonald Sharp
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-16Merge pull request #1298 from opensourcerouting/iface-rb-treeDonald Sharp
Use rb-trees to store interfaces instead of linked-lists
2017-10-10Merge pull request #1316 from donaldsharp/high_stuffRenato Westphal
High stuff
2017-10-10pimd: Fix uninited idx for argv_findDonald Sharp
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-10*: use the FOR_ALL_INTERFACES abstraction from babeldRenato Westphal
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*: use rb-trees to store interfaces instead of sorted linked-listsRenato Westphal
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-09pimd: Cleanup deep nesting in pim_cmd.cDonald Sharp
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-09pimd: Display RPF address as part of json outputDonald Sharp
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-05pimd: Fix multicast boundary commandDonald Sharp
1) Fix missing newlines 2) Write the correct cli out. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-28pimd: Add 'show ip mroute fill' commandDonald Sharp
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-26pimd: add support for boundariesQuentin Young
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>