summaryrefslogtreecommitdiffstats
path: root/pimd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* pimd: make clang-format slightly less annoyingDavid Lamparter2024-06-202-2/+2
| | | | | | The YANG module list is really better as 1-item-per-line. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: Give a clearer warning when the kernel is not compiled rightDonald Sharp2024-05-311-4/+8
| | | | | | | | | When the kernel is not compiled with mroute vrf's enabled it will fail the call to initialize the vrf. As such let's recognize this specific error code and output a specific warning to the operator to help them figure this problem out. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* pimd: fix crash when mixing ssm/any-source joinsJafar Al-Gharaibeh2024-05-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | There is no reason to call `igmp_anysource_forward_stop()` inside a call to `igmp_get_source_by_addr()`; not only it is not expected for a "get" function to perform such an action, but also the decision to start/stop forwarding is already handled correctly by pim outside `igmp_get_source_by_addr()`. That call was left there from the days pim was initially imported into the sources. The problem/crash was happening because `igmp_find_source_by_addr()` would fail to find the group/source combo when mixing `(*, G)` and `(S, G)`. When having an existing flow `(*, G)`, and a new `(S, G)` igmp is received, a new entry is correctly created. `igmp_anysource_forward_stop(group)` always stops and eventually frees `(*, G)`, even when the new igmp is `(S, G)`, leaving a bad state. I.e, the new entry for `(S, G)` causes `(*, G)` to be deleted. Tested the fix with multiple receivers on the same interface with several ssm and any source senders and receivers with various combination of start/stop orders and they all worked correctly. Fixes: #15630 Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
* pimd: fix order of operations for evaluating joinDavid Lamparter2024-05-081-1/+7
| | | | | | | | | | join_desired looks at whether up->channel_oil is empty. up->channel_oil is updated from pim_forward_stop(), calling pim_channel_del_oif(). But that was being called *after* updating join_desired, so join_desired saw a non-empty OIL. Pull up the pim_forward_stop() call to before updating join_desired. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: fix null register before aging out reg-stopDavid Lamparter2024-05-083-23/+49
| | | | | | | | It looks like the code was trying to do this with the null_register parameter on pim_upstream_start_register_stop_timer(), but that didn't quite work right. Restructure a bit to get it right. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: fix dr-priority rangeDavid Lamparter2024-05-082-4/+4
| | | | | | 0 is a valid DR priority. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* pimd: fix crash unconfiguring rp keepalive timerVijayalaxmi Basavaraj2024-04-261-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pimd crashs while unconfigure of rp ka timer as we are trying to access a yand dnode(suppress timer) which does not exist at the moment. User just configured rp keepalive timer and not suppress timer, the yang dnode would not be present. Instead of directly accessing yang_dnode_get_unit16, first check the yang node exist using the xpath. Ticket: #3874971 Testing: Before: ------ tor-11(config)# no ip pim rp keep-alive-timer 3000 vtysh: error reading from pimd: Success (0)Warning: closing connection to pimd because of an I/O error! Broadcast message from root@tor-11 (somewhere) (Mon Apr 22 17:29:12 2024): cumulus-core: Running cl-support for core files "pimd.25467.1713806952.core" After: ----- tor-11(config)# no ip pim rp keep-alive-timer 3000 tor-11(config)# Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Vijayalaxmi Basavaraj <vbasavaraj@nvidia.com>
* Merge pull request #15661 from routingrocks/masterDonatas Abraitis2024-04-111-6/+9
|\ | | | | pimd: pim mlag summary should display the down connection status.
| * pimd: pim mlag summary should display the down connection status.Rajesh Varatharaj2024-04-051-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | command 'show ip pim mlag summary json' should display 'mlagConnUp', 'mlagPeerConnUp', and 'mlagPeerZebraUp' when the connection is down. Fix: Added 'json_object_boolean_false_add()' for these objects. Ticket: # Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
* | Merge pull request #13627 from anlancs/pimd/pimreg-vrf-add-breakmobash-rasool2024-04-101-0/+2
|\ \ | |/ |/| pimd: Set pimreg interface with one master
| * pimd: Set pimreg interface with one masteranlan_cs2023-05-301-0/+2
| | | | | | | | | | | | Add break for loop, `pimreg` interface should be with one master. Signed-off-by: anlan_cs <vic.lan@pica8.com>
* | Merge pull request #15509 from donaldsharp/freebsd_cleanupsDonatas Abraitis2024-03-091-4/+24
|\ \ | | | | | | pimd: Cleanup inclusion of headers
| * | pimd: Cleanup inclusion of headersDonald Sharp2024-03-081-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FRR needs to properly include the FreeBSD headers for compilation on FreeBSD. I have setup v6 as well but I have not even tested it. Since I know that the form is the same I think this is ok at the moment. This is a step forward. Because of this change *clearly* no-one is even using pim on FreeBSD. <look at the MRT_XXX values to prove to yourself>. In any event this is a step in the direction of getting that working again. Signed-off-by: Donald Sharp <sharpd@freebsd.network>
* | | pimd: re-evaluated S,G OILs upon RP changes and for empty SG upstream oilsRajesh Varatharaj2024-02-083-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Topology: TOR11 (FHR) --- LEAF-11---SPINE1 (RP)MSDP SPINE-2(RP)MSDP --- LEAF-12 -- TOR12 (LHR) | | | | | | -----------------------------------------------------(ECMP) | | | | | -----------------------------------------------------------------------(ECMP) Issue: In some triggers, S,G upstream is preserved even with the PP timer expiry, resulting in S,G with NULL OILS. This could be because we create a dummy S,G upstream and dummy channel_oif for *,G, where RPF is UNKNOWN. As a result, PIM+VXLAN traffic is never forwarded downstream to LHR. Fix: when the S,G stream is running, Determine if a reevaluation of the outgoing interface list (OIL) is required. S,G upstream should then inherit the OIL from *,G. Testing: - Evpn pim tests - TestEvpnPimSingleVtepOneMdt.test_02_broadcast_traffic_spt_zero - pim-smoke Ticket: # Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
* | | *: use af-specific autocompletion for prefix-lists when possibleIgor Ryzhov2024-02-042-11/+11
| | | | | | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | | *: create a single registry of daemons' default port valuesMark Stapp2024-02-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Create a single registry of default port values that daemons are using. Most of these are vty ports, but there are some others for features like ospfapi and zebra FPM. Signed-off-by: Mark Stapp <mjs@labn.net>
* | | *: fix `frr_daemon_info` indentationDavid Lamparter2024-01-271-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-format doesn't understand FRR_DAEMON_INFO is a long macro where laying out items semantically makes sense. (Also use only one `FRR_DAEMON_INFO(` in isisd so editors don't get confused with the mismatching `( ( )`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | Merge pull request #15196 from idryzhov/nb-leaf-listDonald Sharp2024-01-241-24/+28
|\ \ \ | | | | | | | | lib: remove leaf-list xpath hack from northbound
| * | | lib: remove leaf-list xpath hack from northboundIgor Ryzhov2024-01-231-24/+28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when editing a leaf-list, `nb_candidate_edit` expects to receive it's xpath without a predicate and the value in a separate argument, and then creates the full xpath. This hack is complicated, because it depends on the operation and on the caller being a backend or not. Instead, let's require to always include the predicate in a leaf-list xpath. Update all the usages in the code accordingly. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* / / pimd: fix crash when configuring ssmpingdIgor Ryzhov2024-01-231-4/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Command: `ip ssmpingd 1.1.1.1` Backtrace: ``` __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 0x00007fd1d3b02859 in __GI_abort () at abort.c:79 0x00007fd1d3e323e1 in yang_dnode_xpath_get_canon (dnode=<optimized out>, xpath_fmt=<optimized out>, ap=<optimized out>) at lib/yang_wrappers.c:61 0x00007fd1d3e34f41 in yang_dnode_get_ipv4 (addr=addr@entry=0x7ffc368554d4, dnode=<optimized out>, xpath_fmt=xpath_fmt@entry=0x5556af8680d4 "./source-addr") at lib/yang_wrappers.c:826 0x00005556af8216d3 in routing_control_plane_protocols_control_plane_protocol_pim_address_family_ssm_pingd_source_ip_create (args=0x7ffc36855530) at pimd/pim_nb_config.c:925 0x00007fd1d3dec13f in nb_callback_create (nb_node=0x5556b197ea40, nb_node=0x5556b197ea40, errmsg_len=8192, errmsg=0x7ffc36855a90 "", resource=0x5556b18fa6f8, dnode=0x5556b1ad7a10, event=NB_EV_APPLY, context=0x5556b1ad75c0) at lib/northbound.c:1260 nb_callback_configuration (context=0x5556b1ad75c0, event=NB_EV_APPLY, change=<optimized out>, errmsg=0x7ffc36855a90 "", errmsg_len=8192) at lib/northbound.c:1648 0x00007fd1d3deca6c in nb_transaction_process (event=event@entry=NB_EV_APPLY, transaction=transaction@entry=0x5556b1ad75c0, errmsg=errmsg@entry=0x7ffc36855a90 "", errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:1779 0x00007fd1d3decdd6 in nb_candidate_commit_apply (transaction=0x5556b1ad75c0, save_transaction=save_transaction@entry=true, transaction_id=transaction_id@entry=0x0, errmsg=errmsg@entry=0x7ffc36855a90 "", errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:1129 0x00007fd1d3decf15 in nb_candidate_commit (context=..., candidate=<optimized out>, save_transaction=save_transaction@entry=true, comment=comment@entry=0x0, transaction_id=transaction_id@entry=0x0, errmsg=0x7ffc36855a90 "", errmsg_len=8192) at lib/northbound.c:1162 0x00007fd1d3ded4af in nb_cli_classic_commit (vty=vty@entry=0x5556b1ada2a0) at lib/northbound_cli.c:50 0x00007fd1d3df025f in nb_cli_apply_changes_internal (vty=vty@entry=0x5556b1ada2a0, xpath_base=xpath_base@entry=0x7ffc36859b50 ".", clear_pending=clear_pending@entry=false) at lib/northbound_cli.c:177 0x00007fd1d3df06ad in nb_cli_apply_changes (vty=vty@entry=0x5556b1ada2a0, xpath_base_fmt=xpath_base_fmt@entry=0x0) at lib/northbound_cli.c:233 0x00005556af80fdd5 in pim_process_ssmpingd_cmd (vty=0x5556b1ada2a0, operation=NB_OP_CREATE, src_str=0x5556b1ad9630 "1.1.1.1") at pimd/pim_cmd_common.c:3423 0x00007fd1d3da7b0e in cmd_execute_command_real (vline=vline@entry=0x5556b1ac9520, vty=vty@entry=0x5556b1ada2a0, cmd=cmd@entry=0x0, up_level=up_level@entry=0) at lib/command.c:982 0x00007fd1d3da7cb1 in cmd_execute_command (vline=vline@entry=0x5556b1ac9520, vty=vty@entry=0x5556b1ada2a0, cmd=0x0, vtysh=vtysh@entry=0) at lib/command.c:1040 0x00007fd1d3da7e50 in cmd_execute (vty=vty@entry=0x5556b1ada2a0, cmd=cmd@entry=0x5556b1ae0a30 "ip ssmpingd 1.1.1.1", matched=matched@entry=0x0, vtysh=vtysh@entry=0) at lib/command.c:1207 0x00007fd1d3e278be in vty_command (vty=vty@entry=0x5556b1ada2a0, buf=<optimized out>) at lib/vty.c:591 0x00007fd1d3e27afd in vty_execute (vty=0x5556b1ada2a0) at lib/vty.c:1354 0x00007fd1d3e2bb23 in vtysh_read (thread=<optimized out>) at lib/vty.c:2362 0x00007fd1d3e22254 in event_call (thread=thread@entry=0x7ffc3685cd80) at lib/event.c:2003 0x00007fd1d3dce9e8 in frr_run (master=0x5556b183c830) at lib/libfrr.c:1218 0x00005556af803653 in main (argc=6, argv=<optimized out>, envp=<optimized out>) at pimd/pim_main.c:162 ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* | pimd: Use vrf name instead of id in some debugsDonald Sharp2024-01-121-5/+5
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | pimd: Re-align pim_msg_get_jp_group_sizeDonald Sharp2024-01-121-72/+66
| | | | | | | | | | | | | | This function was/is heavily indented, let's refactor this a bit. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | Merge pull request #15130 from donaldsharp/pim_vxlan_issuesDonatas Abraitis2024-01-125-8/+51
|\ \ | | | | | | Pim vxlan issues
| * | pimd: Make some not very needed debugs more restrictiveDonald Sharp2024-01-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When turning on debug pim trace, there are lots of messages surrounding the timing of rpf lookup. 99% of the time no-one cares about these anymore. Let's make them not seen unless we turn up debugs Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | pimd: Receiving a Join or Prune should be under J_P debugsDonald Sharp2024-01-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The Join or Prune messages require you to turn on `trace` but this is part of Join/Prune processing of the packet let's use PIM_DEBUG_PIM_J_P instead of TRACE here. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| * | pimd: Send up to 10 NULL registers on vxlan startupDonald Sharp2024-01-102-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing pim vxlan multicast bum handling, setup the register to send up to 10 null registers on immediate startup. If the null register packet gets dropped this delays the formation of the S,G tree from the RP towards the FHR. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | Merge pull request #15098 from donaldsharp/lib_zebra_h_cleanup_2Donatas Abraitis2024-01-111-0/+1
|\ \ \ | | | | | | | | Lib zebra h cleanup 2
| * | | *: zebra.h should not have fcntl.hDonald Sharp2024-01-091-0/+1
| |/ / | | | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* / / pimd: Cleanup SA issue with value never usedDonald Sharp2024-01-091-1/+1
|/ / | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Remove sys/ioctl.h from zebra.hDonald Sharp2024-01-042-0/+2
| | | | | | | | | | | | | | Practically no-one uses this and ioctls are pretty much wrappered. Further wrappering could make this even better. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Remove cost of including netinet/icmp.h everywhereDonald Sharp2024-01-042-0/+3
| | | | | | | | | | | | | | This file inclusion is only used in 3 places move the includes to those spots. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | lib: all: remove './' from xpath 22% speedupChristian Hopps2023-11-292-18/+18
| | | | | | | | | | | | fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
* | Merge pull request #14867 from opensourcerouting/zclient-options-cleanupDonald Sharp2023-11-251-4/+1
|\ \ | | | | | | *: clean up `zclient` options
| * | *: add `zclient_options_sync`David Lamparter2023-11-231-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... and use it instead of fiddling with the `.synchronous` field. (Make it const while at it.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | *: convert `struct interface->connected` to DLISTDavid Lamparter2023-11-226-36/+22
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace `struct list *` with `DLIST(if_connected, ...)`. NB: while converting this, I found multiple places using connected prefixes assuming they were IPv4 without checking: - vrrpd/vrrp.c: vrrp_socket() - zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(), irdp_advert_off() (these fixes are really hard to split off into separate commits as that would require going back and reapplying the change but with the old list handling) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | Merge pull request #14850 from donaldsharp/IFNAMSIZ_GET_YOUR_SHIT_TOGETHERDonatas Abraitis2023-11-224-8/+8
|\ \ | | | | | | *: Let's use the native IFNAMSIZ instead of INTERFACE_NAMSIZ
| * | *: Let's use the native IFNAMSIZ instead of INTERFACE_NAMSIZDonald Sharp2023-11-214-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | INTERFACE_NAMSIZ is just a redefine of IFNAMSIZ and IFNAMSIZ is the standard for interface name length on all platforms that FRR currently compiles on. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | | pimd: use `zclient->nexthop_update`David Lamparter2023-11-203-34/+22
|/ / | | | | | | | | | | Same as before, use shared nexthop decode function. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | Merge pull request #14792 from mobash-rasool/fixes2Donald Sharp2023-11-151-0/+10
|\ \ | | | | | | pim6d: Fix memory leaks
| * | pim6d: Fix memory leaksMobashshera Rasool2023-11-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem Statement: ======================== Mentioning few of the leaks here: =3843268== 6 bytes in 3 blocks are still reachable in loss record 1 of 29 ==3843268== at 0x483C855: malloc (vg_replace_malloc.c:381) ==3843268== by 0x489ED0E: qmalloc (memory.c:106) ==3843268== by 0x48DE8DB: redist_add_instance (zclient.c:125) ==3843268== by 0x48DF561: zclient_init (zclient.c:647) ==3843268== by 0x14FFA3: pim_zebra_init (pim_zebra.c:527) ==3843268== by 0x11D021: main (pim6_main.c:178) ==3843268== ==3843268== 24 bytes in 1 blocks are still reachable in loss record 2 of 29 ==3843268== at 0x484147B: calloc (vg_replace_malloc.c:1328) ==3843268== by 0x489EE03: qcalloc (memory.c:111) ==3843268== by 0x4878DDE: buffer_new (buffer.c:72) ==3843268== by 0x48DE7BF: zclient_new (zclient.c:75) ==3843268== by 0x14FF1D: pim_zebra_init (pim_zebra.c:516) ==3843268== by 0x11D021: main (pim6_main.c:178) ==3843268== ==3843268== 24 bytes in 1 blocks are still reachable in loss record 3 of 29 ==3843268== at 0x484147B: calloc (vg_replace_malloc.c:1328) ==3843268== by 0x489EE03: qcalloc (memory.c:111) ==3843268== by 0x4878DDE: buffer_new (buffer.c:72) ==3843268== by 0x48DE7BF: zclient_new (zclient.c:75) ==3843268== by 0x150A3D: zclient_lookup_new (pim_zlookup.c:131) ==3843268== by 0x11D021: main (pim6_main.c:178) RCA: ======================= Memory is allocated when the daemon started but it is not freed when terminated. Fix: ======================= Freeing the memory when daemon goes down. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* | | pimd: Free up link list on shutdownDonald Sharp2023-11-131-0/+3
|/ / | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | *: Move distance related defines into their own headerDonald Sharp2023-11-071-0/+1
| | | | | | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | lib: rename `prefixtype` to `uniontype`David Lamparter2023-11-051-8/+8
| | | | | | | | | | | | | | | | | | | | About to use this for sockunion, which is not a prefix. `uniontype` makes more sense, the macros are for defining transparent unions after all. (clang-format off thrown in as it otherwise wrecks formatting.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | Merge pull request #14723 from opensourcerouting/if_zapi_hooks_convertDonald Sharp2023-11-031-2/+4
|\ \ | | | | | | lib: convert `if_zapi_callbacks` into actual hooks
| * | lib: convert if_zapi_callbacks into actual hooksDavid Lamparter2023-11-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...so that multiple functions can be subscribed. The create/destroy hooks are renamed to real/unreal because that's what they *actually* signal. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | pimd: Ensure upstream points at the correct rpfDonald Sharp2023-10-311-5/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the scenario on an intermediate router where a *,G join has been received and a S,G stream is being sent through that router on the *,G stream, there exists a situation when the *,G in has been pruned but the stream is still being received on on incoming interface towards the RP for the *,G. In this situation PIM will see the S,G stream initially as a NOCACHE from the dataplane, PIM will then do a RPF for the S and notice that it is supposed to be coming in on adifferent interface. In this case PIM the original PIM code would create a blackhole mroute towards the RPF of the *,G( the interface the stream is being received on ). The original reason for this is that if there is a scenario where this particular S1,G stream is sending at basically line rate, and there also happens to be a different S2,G stream that is sending at a very low rate. With certain dataplanes there is no way to really rate limit the S1 -vs- S2 stream and the S1 stream completely overwhelms the S2 stream for sending up to the control plane for proper pim handling. The problem then becomes that FRR never properly responds to the situation where the *,G is rereceived and the S,G stream switches back over to the SPT for itself and FRR ends up with a dead mroute that stops everything from working properly. This code change, installs the blackhole mroute with the RPF towards the RP for the G and then resets the RPF to the correct RPF for the Stream but does not modify the mroute. When the *,G is rereceived and we attempt to transition to the S,G stream this now works. As a note: Both David L and myself do not necessarily believe we fully understand the problem yet. What this does do is fix all the inconsistent CI issues we are seeing in the topotests at this time. Internally I am seeing other test failures in PIM that I don't fully understand and we suspect that there are other problems in the state machine. We plan to revisit this problem as we are able to debug the issue better. In the meantime both David and Myself agree that this gets the CI working again and Streams end up in the right state. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* | Merge pull request #13576 from chiragshah6/mdev1Donatas Abraitis2023-10-301-1/+1
|\ \ | | | | | | zebra:returns empty dict when evpn is disabled II
| * | *: modify empty json helper functionChirag Shah2023-10-291-1/+1
| |/ | | | | | | | | | | | | | | | | | | Modify empty json object to take input obj instead of allocating always one. There are situation where in error condition or no data case print empty json (`{}`) with already allocated Signed-off-by: Chirag Shah <chirag@nvidia.com>
* | pim6d: valgrind issue fixesMobashshera Rasool2023-10-171-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem Statement: =================== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s) at 0x4975157: sendmsg (sendmsg.c:28) ==2263111== by 0x1413BE: pim_msg_send_frame (pim_pim.c:629) ==2263111== by 0x1413BE: pim_msg_send (pim_pim.c:743) ==2263111== by 0x1425DC: pim_register_send (pim_register.c:332) ==2263111== by 0x1427EE: pim_null_register_send (pim_register.c:443) ==2263111== by 0x14D228: pim_upstream_register_stop_timer (pim_upstream.c:1608) ==2263111== by 0x48CE6DF: thread_call (thread.c:1693) ==2263111== by 0x4899EFF: frr_run (libfrr.c:1068) ==2263111== by 0x11D035: main (pim6_main.c:190) ==2263111== Address 0x1ffeffdcb1 is on thread 1's stack ==2263111== in frame #2, created by pim_register_send (pim_register.c:273) ==2263111== Uninitialised value was created by a stack allocation ==2263111== at 0x142690: pim_null_register_send (pim_register.c:389) RCA: ==================== 1. All members of struct pim_msg_header were not initiliased while sending null register packet. Therefore when the pointers are assigned while sending the msg via sendmsg, it complains the pointer points to uninitialised byte. 2. struct ipv6_ph ph was also not initialised. Fix: ==================== Initialised all the members using memset. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
* | build: add -Wimplicit-fallthroughIgor Ryzhov2023-10-121-2/+2
| | | | | | | | | | | | | | | | | | | | Also: - replace all /* fallthrough */ comments with portable fallthrough; pseudo keyword to accomodate both gcc and clang - add missing break; statements as required by older versions of gcc - cleanup some code to remove unnecessary fallthrough Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>