Repository navigation
RDKEMW-000: Fix Coverity defects (1 file) - #362
rdkdevpilot wants to merge 272 commits into
Conversation
Reason for change: In the reported ticket, it is noticed that WiFi Plugin failed to subscribe `onAvailableSSIDs` event but didnt retry. So when scan is called by application, the scan was success but it never posted any update as it never received `onAvailableSSIDs` event from unified networkmanager plugin Test Procedure: As per DELIA-66411 Risks: Medium Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Reason for change: Implement RDKLogger Support to NetworkManager Plugin Test Procedure: Verify logs are printed properly Risks: Low Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Reason for change: Additional Changes to support RDKLogger Test Procedure: Verify logs are printed properly Risks: Low Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
#1) Implemented a cache logic to handle redundant calls * update the review comments
Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
…ate with NetworkManager (#21) Reason for change: Use ComRPC in Network and WiFi Plugin to communicate with NetworkManager Test Procedure: Perform all the Network and Wifi JSONRPC requests n confirm Risks: High Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
…gs (#23) Reason for change: Fixed the empty interface being returned in GetIPSettings Test Procedure: as per DELIA-66721 Risks: Low Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Reason for change: Fixed the empty IPAddress in onIPAddressChange Event Test Procedure: as per DELIA-66775 Risks: Medium Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
* Added support for start WPS * Added support for start WPS
Reason for change: Check the empty interface & ipversion input Test Procedure: Call org.rdk.NetworkManager.GetIPSettings with no input param Risks: Medium Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
* Implemented Test Class for wifisiganlstrength monitor class * Update CMakeLists.txt to include the unittest folder * Update gnome_unit_test.yml to upload the code coverage report --------- Co-authored-by: Karunakaran A <48997923+karuna2git@users.noreply.github.com>
Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Signed-off-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
…tAvailableInterfaces method (#31) * Gnome issue fix for following api wifiConnect addtoknownssid removeknowssid getavilablessid getwifisiganlstrength GetAvailableInterfaces GetPrimaryInterface GetInterfaceState GetIPSettings * onAddressChange event modified * Posting event even if interface already connected before plugin start * Update NetworkManagerGnomeEvents.cpp Signed-off-by: cmuhammedrafi <muhammed_rafi@comcast.com>
…ceChanged EventData (#36) * The onWifiSignalThresholdChanged and onDefaultInterfaceChanged events are posted with empty/null event data. Fixing it * Updated the release version
Reason for change: GetInterfaceState is using the SetInterfaceState networkmanager implementation call instead of GetInterfaceState call. Modified the same. Test Procedure: Check with curl commands Risks: Low Priority: P1 Signed-off-by: Gururaaja ESR <Gururaja_ErodeSriranganRamlingham@comcast.com>
…bled before reboot (#38) -) set interface api updated -) onavailable ssid sterngth renamed -) removed unused variable
Signed-off-by: cmuhammedrafi <muhammed_rafi@comcast.com>
* DELIA-66920 - GetWiFiSignalStrength is not return actual strength Reason for change: Removed the internal mapping and returning the actual strength value Test Procedure: Check with curl command Risks: Low Priority: P1 Signed-off-by: Gururaaja ESR <Gururaja_ErodeSriranganRamlingham@comcast.com>
* RDKE-352 - Modified the WPS API Reason for change: Modified StartWPS API to use wpa_cli and wifiConnect API call to connect with wifi using WPS Test Procedure: Check with StartWPS curl command Risks: Low Priority: P1 Signed-off-by: Gururaaja ESR <Gururaja_ErodeSriranganRamlingham@comcast.com>
…r IARM_BUS_NETWORK_MANAGER_EVENT_INTERFACE_IPADDRESS (#42)
…ead of integer (#43) Co-authored-by: Karunakaran A <48997923+karuna2git@users.noreply.github.com>
Release of v0.5.4
Updated Wifi State
…ange. (#328) * onroutechange event implementation * Added macro to conditional compilation * Modified the code to have separate client to get connectivity status form the connectivity plugin * Added RFC for connectivity manager enabling in networkmanager * Added enable of USE_RFCAPI in proper place * updated with macro USE_CONNECTIVITYCHECKMGR * Added the documentation * Added Bridging of events between networkmanager and connectivity manager * Addressed the crash issue * To Fix the crash * Added reason for isconnectedtointernet API * Updated with compilation issue fix * Added cache logic to read the internet status from connectivitymgr plugin * Changed the reason into default instead of function overloading * Changed connected field to return true for LIMITED_INTERNET state only when connectivitymgr plugin is in use * Fixed compilation issue * Addressed copilot review comments * Addressed copilot review comments * Added more clarity to documentation for reason. Also added copilot review comments * Added reason to the oninternetstatuschange event * Addressed the review comment * Addressed copilot review comments * Addressed review comments * To fix L1 and L2 issue * For rdk proxy this test is not required * Update name of the RFC return code Update name of the RFC return code * Updated with review comments * Corrected variable name * Updated the missed change * Added header chrono * Fixed L1 and L2 issue * Fixed L1 and L2 issue * Change ConnectivityMonitor to non smart pointer to match old way * Fixed compilation issue * Addressed L1 test failure * To test * Removed unused code * Update NetworkManagerImplementation.cpp --------- Co-authored-by: Gururaaja E S R <Gururaja_ErodeSriranganRamlingham@comcast.com> Co-authored-by: RAFI <103924677+cmuhammedrafi@users.noreply.github.com> Co-authored-by: Karunakaran A <48997923+karuna2git@users.noreply.github.com>
Release of 4.0.0
Reason for change: Remove explicit rescan request upon wake-up(NSM-ON). Test Procedure: Change the channel in AP or change the timeout for SAE GTK_REKEY when the box is in DeepSleep & wake-up; ensure WiFi reconnected with 10s; wake-up journey. Priority: P1 Risks: Low Signed-off-by: Devika Jaladi <djalad690@cable.comcast.com> Co-authored-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Release of 4.1.0
…3s to 1s (#345) * RDKEMW-23908: Reduce default ping count (3->1), timeout (3s->1s), interval (0.2s->0.002s) Reason for change: Current Ping method is synchronous and blocks other method calls while ping is executing. This fix is a mitigation. A proper fix requires methods like Ping that trigger long-running operations to be asynchronous. Test Procedure: Refer ticket Risks: Low Signed-off-by: Tony_Ukken2@comcast.com Co-authored-by: Karunakaran A <48997923+karuna2git@users.noreply.github.com> Co-authored-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Release of 4.2.0
Defect ID: 6e0dbd42-72b3-4b14-a740-56f0130fd7fb
There was a problem hiding this comment.
🟡 Changes recommended
The interface and callers must be updated consistently while preserving the caller’s cache data.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This pull request attempts to fix Coverity defect 69144 by changing swapIpCache to accept an rvalue reference and avoid an unnecessary copy.
Changes:
- Changes the
newCacheparameter inplugin/NetworkManagerImplementation.cppfrom pass-by-value to rvalue reference.
File summaries
| File | Review |
|---|---|
plugin/NetworkManagerImplementation.cpp |
The definition no longer matches the header declaration. Updating callers requires preserving cache data to avoid suppressing IP_ACQUIRED events. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new rvalue-only swapIpCache API breaks existing lvalue call sites (notably in tests) and the GNOME events file now uses std::move without including <utility>, risking build failures.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The updated implementation performs a potentially expensive deep copy while holding m_ipCacheMutex, increasing lock contention compared to the prior by-value + move pattern.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (4)
Resolved since last review (2)
| std::set<std::string> swapIpCache(const std::string& iface, | ||
| const std::string& ipFamily, | ||
| IpFamilyCache newCache); | ||
| IpFamilyCache&& newCache); |



Automated Fix for Coverity Defects
Triggered by: Devika Jaladi
Fixed Files
plugin/NetworkManagerImplementation.cppFix Summaries
plugin/NetworkManagerImplementation.cppThe fix correctly addresses the PASS_BY_VALUE defect by changing the parameter from pass-by-value to rvalue reference (&&). The parameter 'newCache' is moved into the cache map at line 1807, which is the appropriate use of an rvalue reference. This eliminates the unnecessary copy of the IpFamilyCache object while preserving the existing logic. The change is minimal, does not introduce any new defects, and follows the acceptable fix pattern for PASS_BY_VALUE defects involving non-trivial types.