summaryrefslogtreecommitdiff
path: root/pimd/pim_cmd.c
AgeCommit message (Collapse)Author
2019-05-14pimd: interface commands to enable/disable bsm processingsaravanank
(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-14pimd: cli changes to show BSM statistics in show ip pim int trafficsaravanank
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-14pimd: implement debug pim bsm commandsaravanank
Signed-off-by: Saravanan K <saravanank@vmware.com>
2019-05-02pimd: Stop crash in show of single interfaceDonald Sharp
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-04-23pimd: Add missing flags to json outputDonald Sharp
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-22pimd: Add ability to select on S or G for `show ip mroute`Donald Sharp
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-22Merge pull request #4025 from AnuradhaKaruppiah/pim-evpnJafar Al-Gharaibeh
pim-evpn: Forwarding overlay BUM traffic via multicast VxLAN tunnels in the underlay
2019-04-20pimd: hidden command to set MLAG parametersAnuradha Karuppiah
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-20pimd: display commands for the pim-vxlan-sg database and worklistAnuradha Karuppiah
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-20pimd: cli changes for pim-debug-vxlanAnuradha Karuppiah
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-20pimd: API for enabling pim on the vxlan term device ipmr-loAnuradha Karuppiah
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-20pimd: add new OIF type in prep for vxlan supportAnuradha Karuppiah
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-18pimd: Add ability to select join S,G for 'show ip pim join`Donald Sharp
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-18pimd: Add ability to select upstream on S,G for `show ip pim upstream`Donald Sharp
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-16Merge pull request #4096 from donaldsharp/pim_nht_cleanupRuss White
Pim nht cleanup
2019-04-11pimd: use debug pim staticMark Stapp
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-05pimd: Tracking of RPF is *separate* from the lookupDonald Sharp
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-04Merge pull request #4073 from donaldsharp/undebug_me_or_notLou Berger
some cleanup across multiple daemons
2019-04-03Merge pull request #4060 from donaldsharp/pim_cherrybombJafar Al-Gharaibeh
Pim cherrybomb
2019-04-03bgpd, pimd: Remove undebug commandsDonald Sharp
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-02pimd: pim_nexthop_lookup should return true/falseDonald Sharp
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-03-31pimd: Introduce mroute_creation in channel oil data structureSarita Patra
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-26pimd: Interfaces can be upto 16 charactersDonald Sharp
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-20Merge pull request #3863 from patrasar/RP_addition_deletion_changesDonald Sharp
Rp addition deletion changes
2019-03-15pimd: Display drpriority as a unsigned intDonald Sharp
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-11Merge pull request #3907 from donaldsharp/pim_electionDavid Lamparter
pimd: Ensure DR election happens when both sides change prio
2019-03-05pimd: Ensure DR election happens when both sides change prioDonald Sharp
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-02-25*: remove null check before XFREEQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-02-25*: Rename backet to bucketTim Bray
Presume typo from original author Signed-off-by: Tim Bray <tim@kooky.org>
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>