summaryrefslogtreecommitdiffstats
path: root/pimd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6308 from donaldsharp/pim_orderingDavid Lamparter2020-04-281-1/+1
|\
| * pimd: Add a needed space for formattingDonald Sharp2020-04-281-1/+1
| | | | | | | | | | | | Display a space in the output. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | pimd: don't split format string from zlog callDavid Lamparter2020-04-281-3/+2
|/ | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: make clippy Makefile rules nicerDavid Lamparter2020-04-271-2/+3
| | | | | | | These are easy to get subtly wrong, and doing so can cause nondeterministic failures when racing in parallel builds. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: use VPATH for vtysh_scanDavid Lamparter2020-04-271-1/+1
| | | | | | No need to put $(top_srcdir) everywhere. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge pull request #6262 from qlyoung/remove-sprintfDavid Lamparter2020-04-2311-21/+27
|\
| * pimd, lib: suppress compiler warnings on snprintfQuentin Young2020-04-211-1/+1
| | | | | | | | | | | | truncation warnings on old compilers Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| * *: sprintf -> snprintfQuentin Young2020-04-2111-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | Merge pull request #6025 from patrasar/rp-info-igmp-group-json-fixDonatas Abraitis2020-04-231-0/+4
|\ \ | | | | | | pimd: Modified rp-info json o/p
| * | pimd: Added a new field "rpAddress" in "show ip pim rp-info jsonSarita Patra2020-04-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: Added a new field "rpAddress" in "show ip pim rp-info json" Before: "40.0.0.2":[ { "outboundInterface":"ens224", "group":"224.0.0.0\/4", "source":"Static" } After: "40.0.0.2":[ { "rpAddress":"40.0.0.2", "outboundInterface":"ens224", "group":"224.0.0.0\/4", "source":"Static" } Signed-off-by: Sarita Patra <saritap@vmware.com>
* | | Merge pull request #6126 from sarav511/watermarkDonald Sharp2020-04-214-18/+112
|\ \ \ | | | | | | | | pimd: Implement watermark warning for igmp group count and add igmp group count
| * | | pimd: show ip igmp groups json output - Make group array for each interfacesaravanank2020-04-091-16/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JSON output for igmp group display is modified as follows for better python handling. 1. Under each interface make array of group as an object 2. Include source and group inside each group object These improvements are required for the set of topotest cases which will be upstreamed shortly. Signed-off-by: Saravanan K <saravanank@vmware.com>
| * | | pimd: Implement watermark warning for igmp group count and add igmp group countsaravanank2020-04-094-2/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CLI will allow user to configure a igmp group limit which will generate a watermark warning when reached. Though watermark may not make sense without setting a limit, this implementation shall serve as a base to implementing limit in future and helps tracking a particular scale currently. Testing: ======= ip igmp watermark-warn <10-60000> on reaching the configured number of group, pim will issue warning 2019/09/18 18:30:55 PIM: SCALE ALERT: igmp group count reached watermak limit: 210(vrf: default) Also added group count and watermark limit configured on cli - show ip igmp groups [json] <snip> Sw3# sh ip igmp groups json { "Total Groups":221, <===== "Watermark limit":210, <========= "ens224":{ "name":"ens224", "state":"up", "address":"40.0.0.1", "index":6, "flagMulticast":true, "flagBroadcast":true, "lanDelayEnabled":true, "groups":[ { "source":"40.0.0.1", "group":"225.1.1.122", "timer":"00:03:56", "sourcesCount":1, "version":2, "uptime":"00:00:24" <\snip> <snip> Sw3(config)# do sh ip igmp group Total IGMP groups: 221 Watermark warn limit(Set) : 210 Interface Address Group Mode Timer Srcs V Uptime ens224 40.0.0.1 225.1.1.122 ---- 00:04:06 1 2 00:13:22 ens224 40.0.0.1 225.1.1.144 ---- 00:04:02 1 2 00:13:22 ens224 40.0.0.1 225.1.1.57 ---- 00:04:01 1 2 00:13:22 ens224 40.0.0.1 225.1.1.210 ---- 00:04:06 1 2 00:13:22 <\snip> Signed-off-by: Saravanan K <saravanank@vmware.com>
* | | | Merge pull request #6251 from opensourcerouting/cs-ignoreDonald Sharp2020-04-203-4/+8
|\ \ \ \ | |_|_|/ |/| | | *: make coverity scan ignore random() calls
| * | | *: replace all random() callsRafael Zalamena2020-04-183-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all `random()` calls with a function called `frr_weak_random()` and make it clear that it is only supposed to be used for weak random applications. Use the annotation described by the Coverity Scan documentation to ignore `random()` call warnings. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* | | | pimd: don't use strcpyQuentin Young2020-04-182-4/+6
|/ / / | | | | | | | | | | | | | | | >:( Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | pimd: if_lookup_by_index can fail handle it appropriatelyDonald Sharp2020-04-172-11/+15
| | | | | | | | | | | | | | | | | | | | | It is possible that a if_lookup_by_index can return NULL ensure that we handle this appropriately. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | | Merge pull request #6247 from FRRouting/nb_conversionsDonald Sharp2020-04-171-0/+1
|\ \ \ | | | | | | | | Merge nb_converions branch to master
| * | | *: include vrf northbound module in initChirag Shah2020-04-161-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* | | | Merge pull request #6135 from opensourcerouting/cli-node-cleanupDonald Sharp2020-04-171-5/+13
|\ \ \ \ | | | | | | | | | | *: clean up the mess that is CLI command nodes
| * | | | *: move CLI node names to cmd_node->nameDavid Lamparter2020-04-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And again for the name. Why on earth would we centralize this, just so people can forget to update it? Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | | *: move CLI parent data to cmd_node->parent_nodeDavid Lamparter2020-04-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as before, instead of shoving this into a big central list we can just put the parent node in cmd_node. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | | *: remove second parameter on install_node()David Lamparter2020-04-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is really no reason to not put this in the cmd_node. And while we're add it, rename from pointless ".func" to ".config_write". [v2: fix forgotten ldpd config_write] Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | | *: remove cmd_node->vtyshDavid Lamparter2020-04-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only nodes that have this as 0 don't have a "->func" anyway, so the entire thing is really just pointless. Signed-off-by: David Lamparter <equinox@diac24.net>
| * | | | *: clean up cmd_node initializersDavid Lamparter2020-04-161-2/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | ... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
* | | | Merge pull request #5451 from opensourcerouting/rcu-logSantosh P K2020-04-161-1/+1
|\ \ \ \ | |/ / / |/| | | logging subsystem rewrite
| * | | lib: rewrite zlog lock-free & TLS-bufferedDavid Lamparter2020-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a full rewrite of the "back end" logging code. It now uses a lock-free list to iterate over logging targets, and the targets themselves are as lock-free as possible. (syslog() may have a hidden internal mutex in the C library; the file/fd targets use a single write() call which should ensure atomicity kernel-side.) Note that some functionality is lost in this patch: - Solaris printstack() backtraces are ditched (unlikely to come back) - the `log-filter` machinery is gone (re-added in followup commit) - `terminal monitor` is temporarily stubbed out. The old code had a race condition with VTYs going away. It'll likely come back rewritten and with vtysh support. - The `zebra_ext_log` hook is gone. Instead, it's now much easier to add a "proper" logging target. v2: TLS buffer to get some actual performance Signed-off-by: David Lamparter <equinox@diac24.net>
* | | | Merge pull request #6011 from patrasar/pim-no-msdp-group-cmdDonald Sharp2020-04-142-5/+23
|\ \ \ \ | | | | | | | | | | pimd: added no ip msdp mesh-group <word>
| * | | | pimd: added no ip msdp mesh-group <word>Sarita Patra2020-04-132-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: no ip msdp mesh-group <word> source command deleting the mesh group, which might be used by the member. Solution: no ip msdp mesh-group <word> source command, deletes the mesh-group source. Add a new cli command "no ip msdp mesh-group <word>" to delete the mesh group. Signed-off-by: Sarita Patra <saritap@vmware.com>
* | | | | Merge pull request #6017 from sarav511/ovrrideDonald Sharp2020-04-141-1/+17
|\ \ \ \ \ | | | | | | | | | | | | pimd: Join not sent within prune override time when received non local prune
| * | | | | pimd: Join not sent within prune override time when received non local prune.saravanank2020-03-171-1/+17
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: Periodic join is mostly sent by nbr jp timer except for few scenarios by upstream join timer Fix: If join timer not running, we have to use nbr jp timer to calculate remaining time for next join. Signed-off-by: Saravanan K <saravanank@vmware.com>
* | | | | Merge pull request #6027 from sarav511/vrfloopDonald Sharp2020-04-101-2/+3
|\ \ \ \ \ | | | | | | | | | | | | pimd: crash while finding primary address.
| * | | | | pimd: crash while finding primary address.saravanank2020-03-191-2/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: Trying to get primary address for the interface. Unnumbered interface pick address from vrf device for non default. While doing so it ends up in recursion without exit condition if vrf dev doesnt have any address. Solution: Break the recursion by checking if it is vrf device. Signed-off-by: Saravanan K <saravanank@vmware.com>
* | | | | *: Do not cast to the same typeDonatas Abraitis2020-04-084-20/+18
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* | | | | Merge pull request #6160 from qlyoung/fix-pim-bsm-negative-shiftDavid Lamparter2020-04-061-0/+7
|\ \ \ \ \ | | | | | | | | | | | | pimd: fix negative bitshift in BSM code
| * | | | | pimd: fix negative bitshiftQuentin Young2020-04-061-0/+7
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Valid range for hashmasklen is 0-32 under IPv4; failure to validate this results in a negative bitshift later Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | | | Merge pull request #6159 from qlyoung/fix-pim-tlv-unaligned-pointer-accessDavid Lamparter2020-04-061-2/+12
|\ \ \ \ \ | | | | | | | | | | | | pimd: fix unaligned pointer access
| * | | | | pimd: fix unaligned access parsing tlvsQuentin Young2020-04-061-2/+12
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Can't use a uint8_t as a uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* / / / / pimd: fix BSM JSON keysQuentin Young2020-04-061-14/+9
|/ / / / | | | | | | | | | | | | | | | | | | | | We use camelCase keys in FRR. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | | Merge pull request #6093 from LabNConsulting/working/lb/no-birdsDavid Lamparter2020-03-311-2/+2
|\ \ \ \ | |_|/ / |/| | | *: use the current project name (FRRouting)
| * | | pimd: fix frr urlLou Berger2020-03-291-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
| * | | *: use the current project name (FRRouting)Lou Berger2020-03-251-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Lou Berger <lberger@labn.net>
* | | | *: fix format string warningsDavid Lamparter2020-03-291-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* | | | Merge pull request #6084 from sarav511/wrvif_crashDonald Sharp2020-03-271-1/+4
|\ \ \ \ | | | | | | | | | | pimd: avoiding crash in wrvifwhole path
| * | | | pimd: avoiding crash in wrvifwhole pathsaravanank2020-03-241-1/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Observed crash in the wrvif whole path. RCA: Wrongvif path trying to access pim attributes of pim disabled RPF interface. This was resulting in Null access. (gdb) p/x rpf->source_nexthop $19 = {last_lookup = {s_addr = 0xa282828}, last_lookup_time = 0x59c0de0828c98, interface = 0x1013e5011300, mrib_nexthop_addr = {family = 0x2, prefixlen = 0x20, u = {prefix = 0x28, prefix4 = {s_addr = 0xa282828}, prefix6 = {__in6_u = {__u6_addr8 = {0x28, 0x28, 0x28, 0xa, 0x0 <repeats 12 times>}, __u6_addr16 = {0x2828, 0xa28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, __u6_addr32 = {0xa282828, 0x0, 0x0, 0x0}}}, lp = {id = {s_addr = 0xa282828}, adv_router = {s_addr = 0x0}}, prefix_eth = {octet = {0x28, 0x28, 0x28, 0xa, 0x0, 0x0}}, val = {0x28, 0x28, 0x28, 0xa, 0x0 <repeats 12 times>}, ptr = 0xa282828, prefix_evpn = {route_type = 0x28, u = {_ead_addr = {esi = {val = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, eth_tag = 0x0}, _macip_addr = {eth_tag = 0x0, ip_prefix_length = 0x0, mac = { octet = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, ip = {ipa_type = 0x0, ip = {addr = 0x0, _v4_addr = {s_addr = 0x0}, _v6_addr = { __in6_u = {__u6_addr8 = {0x0 <repeats 16 times>}, __u6_addr16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, __u6_addr32 = {0x0, 0x0, 0x0, 0x0}}}}}}, _imet_addr = { eth_tag = 0x0, ip_prefix_length = 0x0, ip = {ipa_type = 0x0, ip = { addr = 0x0, _v4_addr = {s_addr = 0x0}, _v6_addr = {__in6_u = { __u6_addr8 = {0x0 <repeats 16 times>}, __u6_addr16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, __u6_addr32 = {0x0, 0x0, 0x0, 0x0}}}}}}, _es_addr = {esi = {val = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, ---Type <return> to continue, or q <return> to quit---q ip_prefix_length = 0x0Quit (gdb) p/x rpf->source_nexthop.interface $20 = 0x1013e5011300 (gdb) p/x rpf->source_nexthop.interface->info $21 = 0x0 <======================== Pim & Igmp is disabled on this interface Fix: Return when the rpf interface is not pim enabled Signed-off-by: Saravanan K <saravanank@vmware.com>
* | | | Merge pull request #5925 from volta-networks/synchronous_clientRenato Westphal2020-03-261-1/+13
|\ \ \ \ | |_|/ / |/| | | zebra: synchronous client queues accumulate messages from zebra
| * | | zebra: Synchronous client queues accumulate messages from zebra.Karen Schoener2020-03-231-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zebra is currently sending messages on interface add/delete/update, VRF add/delete, and interface address change - regardless of whether its clients had requested them. This is problematic for lde and isis, which only listens to label chunk messages, and only when it is waiting for one (synchronous client). The effect is the that messages accumulate on the lde synchronous message queue. With this change: - Zebra does not send unsolicited messages to synchronous clients. - Synchronous clients send a ZEBRA_HELLO to zebra. The ZEBRA_HELLO contains a new boolean field: sychronous. - LDP and PIM have been updated to send a ZEBRA_HELLO for their synchronous clients. Signed-off-by: Karen Schoener <karen@voltanet.io>
* | | | Merge pull request #6079 from sarav511/regstop_expDonald Sharp2020-03-251-0/+2
|\ \ \ \ | | | | | | | | | | pimd: Reg Suppression expiry has to account for couldreg->false while in RegPrune
| * | | | pimd: Reg Suppression expiry has to account for couldreg->false while in prunesaravanank2020-03-241-0/+2
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: This happened in once in a while during testing the scenario multiple times. When regstop timer expire and at that point if rpf interface doesn't exist, the register state for the upstream gets struck in reg-prune state indefinitely. This will not recover even when rpf comes back and traffic resumed because register state is struck on prune. RCA: Reg suppression expiry is keeping reg state unchanged when iif is absent. Fix: When iif is absent during reg suppression expiry, treat it as couldreg becoming false and move it NO_INFO state. Signed-off-by: Saravanan K <saravanank@vmware.com>
* | | | Merge pull request #6087 from opensourcerouting/log-kill-tabsDonald Sharp2020-03-252-14/+12
|\ \ \ \ | | | | | | | | | | *: remove tabs and linefeeds from log messages