summaryrefslogtreecommitdiffstats
path: root/pimd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3018 from donaldsharp/twheel_namesDavid Lamparter2018-09-141-4/+7
|\ | | | | Twheel names
| * lib, pimd: Convert timer_wheel to use thread_execute_nameDonald Sharp2018-09-131-4/+7
| | | | | | | | | | | | | | | | | | Allow at timer wheel creation time the ability to specify a name for what we want the 'show thread cpu' to show up as. Modify pim to note this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | *: style for EC replacementsQuentin Young2018-09-137-25/+24
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: LIB_[ERR|WARN] -> EC_LIBQuentin Young2018-09-1313-40/+40
| | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | pimd: PIM_[ERR|WARN] -> EC_PIMQuentin Young2018-09-135-7/+7
|/ | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge pull request #3009 from pacovn/static_analysis__shadow_variables3Donald Sharp2018-09-133-7/+6
|\ | | | | pimd ripd ripngd: variable shadowing fixes
| * pimd ripd ripngd: variable shadowing fixesF. Aragon2018-09-123-7/+6
| | | | | | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* | pimd: fix indentation warningsSarita Patra2018-09-121-6/+6
|/ | | | Signed-off-by: Sarita Patra <saritap@vmware.com>
* Merge pull request #2985 from patrasar/Fix_1636Donald Sharp2018-09-112-46/+49
|\ | | | | pimd: create a new command "ip pim" configuring pim sm
| * 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
* | Merge pull request #2977 from opensourcerouting/doc-fixDonald Sharp2018-09-091-2/+2
|\ \ | | | | | | build: fix not building docs w/o sphinx
| * | build: fix not building docs w/o sphinxDavid Lamparter2018-09-091-2/+2
| | | | | | | | | | | | | | | | | | Can't build manpages without sphinx-build, oops... Signed-off-by: David Lamparter <equinox@diac24.net>
* | | *: fix some random warningsDavid Lamparter2018-09-091-1/+1
| | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* | | *: fix config.h/zebra.h include orderDavid Lamparter2018-09-084-0/+16
|/ / | | | | | | | | | | | | | | config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
* | *: cleanup .gitignore filesDavid Lamparter2018-09-081-14/+0
| | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* | build: move vtysh & manpage listings to subdir.amDavid Lamparter2018-09-081-0/+3
|/ | | | | | | Since we're now building through one large Makefile, we can easily put things with their daemons and crossreference nicely. Signed-off-by: David Lamparter <equinox@diac24.net>
* 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>