summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
AgeCommit message (Collapse)Author
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>
2017-09-26Merge pull request #1069 from donaldsharp/rfc_plistPhilippe Guibert
PIM: allow overlapping group ranges for prefix-list and static RP's
2017-09-22pimd: fix some null pointer derefs in cliQuentin Young
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-15*: use clang's 'ForEachMacros' format style optionRenato Westphal
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-14pimd: Allow igmp join messages to return more detailed errorsDonald Sharp
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-14pimd: Add new 'debug pim nht rp' commandDonald Sharp
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-08-31pimd: Add ability to lookup RP group by table.Donald Sharp
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-24pimd: Cleanup a variety of SA issuesDonald Sharp
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-24pimd: Cleanup S,GRPt prune handling on Mroute LossDonald Sharp
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>