summaryrefslogtreecommitdiffstats
path: root/pimd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pimd: create a new command "ip pim" configuring pim smroot2018-09-112-46/+49
| | | | | | | | | | 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
* bgpd, ospfd, pimd, zebra: Convert more use_json locations to boolDon Slice2018-09-043-36/+32
| | | | Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* Merge pull request #2945 from dslicenc/bgp-ospf-jsonDavid Lamparter2018-09-013-40/+40
|\ | | | | bgpd/ospfd: make bgp and ospf json response a bit more consistent
| * bgpd/ospfd: make bgp and ospf json response a bit more consistentDon Slice2018-08-303-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | *: add a vrf update hook to be informed of the vrf namePhilippe Guibert2018-08-281-1/+2
|/ | | | | | | | The Vrf aliases can be known with a specific hook. That hook will then, from zebra propagate the information to the relevant zapi clients. The registration hook function is the same for all daemons. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* pimd: Add some more useful data to debug outputDonald Sharp2018-08-281-2/+3
| | | | | | | | | End user was seeing this debug but we are not giving the user enough information to debug this on his own. Add a tiny bit of extra information that could point the user to solving the problem for themselves. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: if multiple connecteds, select loopback or vrf if presentDon Slice2018-08-233-12/+2
| | | | Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
* Merge pull request #2850 from patrasar/Fix_2363Donald Sharp2018-08-222-1/+12
|\ | | | | Fix pim_mroute_del crash while killing pimd
| * pimd: Fix pim_mroute_del crash while terminating pimdroot2018-08-222-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pimd is getting terminated, pim_upstream_del() gets called as part of cleaning process. pim_upstream_del() deletes the route and assigns NULL to the up->channel_oil. It also deletes each if_channel by calling the function pim_ifchannel_delete(). pim_ifchannel_delete() internally calls the caller function pim_upstream_del(), if it is the last ifchannel for that upstream. So pim_upstream_del is getting called twice, which will access the up->channel_oil which was already set to NULL before. This results in crash. Fix: pim_ifchannel_delete() should call pim_upstream_del (caller function) only if the up->ref_count > 0. Added an assert(up->ref_count > 0) in the function pim_upstream_del(). Signed-off-by: Sarita Patra <saritap@vmware.com>
* | *: fix gcc-8 format-overflow warningsDavid Lamparter2018-08-212-7/+8
|/ | | | | | | | | | 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>
* Merge pull request #2846 from donaldsharp/backet_dataRuss White2018-08-161-3/+0
|\ | | | | Backet data
| * pimd: Trust backet->dataDonald Sharp2018-08-151-3/+0
| | | | | | | | | | | | The backet->data cannot be NULL, no need to check for it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge pull request #2849 from patrasar/memory_leak_nhtRuss White2018-08-161-0/+2
|\ \ | | | | | | Fix memory leak pim nexthop creation
| * | pimd: Fix memory leak pim nexthop creationSarita Patra2018-08-161-0/+2
| |/ | | | | | | | | | | | | | | While terminating pim instance, the memory allocated for pim nexthop should be released before deallocating the memory of pim nexthop cache(pnc). This resolves the memory leak detected in pnc->nexthop creation. Signed-off-by: Sarita Patra <saritap@vmware.com>
* | *: frr_elevate_privs whitespace fixesDavid Lamparter2018-08-141-2/+2
| | | | | | | | | | | | (... and one superfluous variable removed) Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: use frr_elevate_privs() (2/2: manual)David Lamparter2018-08-141-13/+3
| | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: use frr_elevate_privs() (1/2: coccinelle)David Lamparter2018-08-142-70/+43
| | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: rename ferr_zlog -> flog_err_sysQuentin Young2018-08-147-49/+54
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: rename ferr_ref -> log_refQuentin Young2018-08-142-3/+3
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: rename zlog_fer -> flog_errQuentin Young2018-08-1415-56/+56
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: correct typos in error reference cardsQuentin Young2018-08-141-1/+1
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: stop double initialization of ferrQuentin Young2018-08-141-2/+0
| | | | | | | | | | | | | | | | * Stop double init of ferr * Fixup bugs in zebra ferr * Add missing init in ospfd Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: fix source file headers & includes for errcodesQuentin Young2018-08-142-21/+24
| | | | | | | | | | | | | | | | | | | | * Use the correct license header * Stop headers from including themselves * Use uniform relative include conventions * Ensure that sources include what they use * Turn off clang-format around struct array blocks Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | pimd: Add pim_errors and define some pim specific errorsDonald Sharp2018-08-1410-12/+107
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Convert over to use LIB_ERR_XXX for zlog_errDonald Sharp2018-08-1416-127/+138
|/ | | | | | | Convert, where appropriate, the zlog_err functions to zlog_ferr for the LIB_ERR_XXX enums Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Merge branch 'master' into bfd-finalDonald Sharp2018-08-146-55/+5
|\
| * lib, vtysh: fix inconsistent interface commands in vtyshRenato Westphal2018-08-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The definition of the interface commands in vtysh.c were outdated. Currently, all daemons that call if_cmd_init() will have the "no interface IFNAME" command and the "[no] description" commands as well, so there's no need to define exceptions for these commands anymore. To fix this, make extract.pl parse the if.c file so that vtysh can get the interface commands from there automatically. Only the "interface IFNAME [vrf NAME]" must be kept in vtysh.c because it changes the vty node and thus needs special treatment. Finally, make pimd and pbrd display interface descriptions on "sh run" when they are configured. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * *: ALLOC calls cannot failDonald Sharp2018-08-115-55/+0
| | | | | | | | | | | | | | | | 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>
* | bgpd/ospf(6)d/pimd: hide BFD commands with timersRafael Zalamena2018-08-081-1/+10
| | | | | | | | | | | | | | | | 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>
* | bgpd/ospf(6)d/pimd: don't show BFD timersRafael Zalamena2018-08-081-0/+2
|/ | | | | | | | When BFD timers are configured, don't show it anymore in the daemon side. This will help us migrate the timers command from daemons to `bfdd`. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* pimd: fix bogus uninitialized warningDavid Lamparter2018-08-081-1/+1
| | | | | | | | | | pimd/pim_nht.c: In function ‘pim_ecmp_nexthop_search’: pimd/pim_nht.c:523:17: error: ‘nbr’ may be used uninitialized in this function [-Werror=maybe-uninitialized] nexthop->nbr = nbr; (on gcc 5.4.0; this is the only warning with that version.) Signed-off-by: David Lamparter <equinox@diac24.net>
* bgpd pimd: return check (Coverity 1472232 1472234)F. Aragon2018-08-061-3/+3
| | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* Merge pull request #2758 from donaldsharp/pim_joinRuss White2018-08-044-27/+14
|\ | | | | lib and pim silliness
| * pimd: Only need 1 return from a functionDonald Sharp2018-08-021-2/+0
| | | | | | | | | | | | | | When there is a return at the end of a function, there is no need for another one immediately after it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * pimd: pim_socket_join_source is only called from one placeDonald Sharp2018-08-023-25/+14
| | | | | | | | | | | | | | | | The pim_socket_join_source function only ever calls pim_igmp_join_source and pim_socket_join_source is only called from 1 place. Skip the level of indirection. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | Merge pull request #2773 from donaldsharp/pim_orderingRuss White2018-08-041-9/+9
|\ \ | | | | | | Pim ordering
| * | pimd: Modify order of command output for vty outputDonald Sharp2018-08-021-9/+9
| |/ | | | | | | | | | | | | | | | | If `ip igmp query-max-response-time` is set move it to display first as that this command has order dependencies on `ip igmp query-interval`. Ticket: CM-21598 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | lib, bgpd, ospf6d, ospfd, pimd: Allow finish to cleanup a bit moreDonald Sharp2018-08-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling route_map_finish, every place that we do we must first set the deletion event to NULL, or we will create an infinite loop, if we are using the delayed route-map application code. As such we might as well just make the route_map_finish code do this work, as that there is really no viable alternative here and route_map_finish should only be called on shutdown. This fixes an infinite loop in zebra on shutdown when there are route-maps. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: On shutdown ensure wheel existsDonald Sharp2018-08-031-1/+2
| | | | | | | | | | | | | | On shutdown and cleaning up pim_upstream ensure that the upstream_sg_wheel still exists to remove item from. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Cleanup msdp.mg on shutdownDonald Sharp2018-08-031-6/+9
| | | | | | | | | | | | When shutting down PIM, ensure that hte pim->msdp.mg is cleaned up. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Cleanup bfd memory on shutdownDonald Sharp2018-08-033-5/+8
| | | | | | | | | | | | When shutting down pim, ensure that we cleanup bfd memory Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Fix crash on shutdown in oilDonald Sharp2018-08-031-2/+2
| | | | | | | | | | | | | | | | When shutting down, do not free oil information after interface information since we use the data there to do so. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Don't leak wheel memoryDonald Sharp2018-08-031-0/+4
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Properly cleanup ssmDonald Sharp2018-08-031-1/+6
| | | | | | | | | | | | Properly cleanup the ssm data structure on termination. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: Cleanup rp_info->plistDonald Sharp2018-08-031-1/+3
| | | | | | | | | | | | | | PIM is leaking the plist data structure in some shutdown cases. Additionally trust XFREE Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pim: Clean up some data on shutdown in msdpDonald Sharp2018-08-031-0/+6
| | | | | | | | | | | | | | We were leaking some msdp hash backets and a msdp stream data pointer on shutdown. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: No need to call zprivs_terminate 2 timesDonald Sharp2018-08-031-2/+0
|/ | | | | | | frr_fini and pim_free both call zprivs_terminate. There is no need for pim_free to call this function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Abstract a RPF change for upstream handlingDonald Sharp2018-08-013-108/+63
| | | | | | | Abstract the RPF change for upstream handling code so that we do not have two copies of the code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Abstract sending of data to peersDonald Sharp2018-07-313-34/+28
| | | | | | | After we have decided what has changed as part of a update we need to send the j/p messages to our peers. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: RPT Prunes do not need to be figured for a *,G PruneDonald Sharp2018-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Packet sending in PIM is a two step process. 1) Gather data size of next G to be packed into a packet. 2) Write data After 1 we need to ensure that the next G to pack will actually fit in a packet. If it does not send what we've currently written and start a new packet to send. Because this was a 2 step process it is important to be consistent in what you think you have packed -vs- what you think you should. PIM has a bug where we were considering S,G RPT Prunes for a *,G even when the *,G was being pruned. This lead to a situation where we were figuring a write size of more data then what we actually wrote into a packet. This would leave a 8 byte whole of 0's in the packet due to the way we moved pointers around. Fix the code so that we do not attempt to consider S,G rpt prunes for a *,G prune when figuring out how much we should write in step 1. Ticket: CM-21644 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>