Rebase feature/RDKEMW-8178 branch inline with develop - #434
Open
KTirumalaSrihari wants to merge 264 commits into
Open
Rebase feature/RDKEMW-8178 branch inline with develop#434KTirumalaSrihari wants to merge 264 commits into
KTirumalaSrihari wants to merge 264 commits into
Conversation
…elop Deploy cla action
RDKTV-38567: PAT_EntOS_A4K-Soft Reboot failed from settings; Stuck on Black screen
Reason for change: Defauting MTLS and remove fallback Test Procedure: Make sure all communication is MTLS & secure Risks: Medium Priority: P1
Deploy fossid_integration_stateless_diffscan_target_repo action
Rebase with develop
Release tag for sysint repo
Rebase with develop
RDKE-921: Clean up the mitigation done for dnsmasq restart in Xumo TV Release
Rebase with develop
RDK-58220 : [RDKE] Migrate Functionality In TR-69Hostif And NTP Scripts To Core Modules
Rebase with develop
* RDKEMW-7549 : Increase in SYST_WARN_WiFiNotConn marker Reason for change: Skip printing TELEMETRY_WIFI_NOT_CONNECTED for the first time. This reduces false alarm in case of deepsleep resume. Test Procedure: Flash the image and check the presence of SYST_WARN_WiFiNotConn marker after deepsleep resume Risks: Low Priority: P1 Signed-off-by: Nivetha J <Nivetha_JosephJohnBritto@comcast.com> * Update networkConnectionRecovery.sh --------- Signed-off-by: Nivetha J <Nivetha_JosephJohnBritto@comcast.com>
Co-authored-by: Saranya <saranya_elango@comcast.com>
Sysint 3.0.7 release tag
Rebase with develop
RDKE-900 RDKEMW-4899: Default to MTLS connection on all endpoints
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 63 out of 63 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (5)
lib/rdk/readBTAddress-generic.sh:31
bluetooth_maccan be unset when Bluetooth is disabled, which makes the script print an empty value. Callers (e.g., device detail collection) typically expect a deterministic MAC string even when Bluetooth is off.
lib/rdk/startStunnel.sh:158- This block references
PASSCODE(never set anywhere in the script) and useseval, plus it creates a named pipe viamktemp -u(TOCTOU race). There’s also no consumer ofFD_NUMBERlater in the script, so this logic is currently dead code and can fail or introduce risk at runtime.
lib/rdk/timesyncd-conf-update.sh:140 - The script updates
/etc/systemd/timesyncd.confbut no longer restartssystemd-timesyncd, so the new NTP settings may not take effect until a later restart. Also, appendingConnectionRetrySec=5on every run can create duplicate entries.
lib/rdk/alertSystem.sh:107 MSG_DATAis interpolated directly into JSON and also into a single-quoted curl-dstring. If the alert message contains quotes, backslashes, newlines, or a single quote, the JSON/payload can become invalid (or the shell quoting can break), causing alerts to fail or be malformed.
if [ "x$PROCESS_NAME" == "xdeepSleepMgrMain" ]; then
# Message data is actual metadata header in case of trigger from deepSleep manager process
# This change is needed since there are data clouds in different deployment which are not flexible to accomodate any deviations in data format
strjson="{\"searchResult\":[{\"Time\":\"$currentTime\"},{\"process_name\":\"$PROCESS_NAME\"},{\"mac\":\"$estb_mac\"},{\"Version\":\"$software_version\"},{\"PartnerId\":\"$partnerId\"},{\"$MSG_DATA\":\"1\"}]}"
else
strjson="{\"searchResult\":[{\"process_name\":\"$PROCESS_NAME\"},{\"mac\":\"$estb_mac\"},{\"Version\":\"$software_version\"},{\"msgTime\":\"$currentTime\"},{\"PartnerId\":\"$partnerId\"},{\"logEntry\":\"$MSG_DATA\"}]}"
fi
lib/rdk/networkConnectionRecovery.sh:272
for i in {1..9}uses brace expansion, which is not POSIX and will not run under many/bin/shimplementations (e.g., BusyBoxash). This can break the packet-loss telemetry loop entirely on targets where/bin/shisn’t bash.
for i in {1..9}; do
if ([ "$packetsLostipv4" -ge $((i*10)) ] && [ "$packetsLostipv4" -lt $((i*10+10)) ]) || ([ "$packetsLostipv6" -ge $((i*10)) ] && [ "$packetsLostipv6" -lt $((i*10+10)) ]); then
echo "$(/bin/timestamp) Current Packet loss is WIFIV_WARN_PL_"$((i*10))"PERC" >> "$logsFile"
t2CountNotify "WIFIV_WARN_PL_"$((i*10))"PERC"
break
Release 6.0.1 6.0.1
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 63 out of 63 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (7)
lib/rdk/networkConnectionRecovery.sh:274
- This script is
/bin/sh, but the{1..9}brace expansion is a bash feature. On POSIX shells this won’t expand and will break the packet-loss notification loop.
for i in {1..9}; do
if ([ "$packetsLostipv4" -ge $((i*10)) ] && [ "$packetsLostipv4" -lt $((i*10+10)) ]) || ([ "$packetsLostipv6" -ge $((i*10)) ] && [ "$packetsLostipv6" -lt $((i*10+10)) ]); then
echo "$(/bin/timestamp) Current Packet loss is WIFIV_WARN_PL_"$((i*10))"PERC" >> "$logsFile"
t2CountNotify "WIFIV_WARN_PL_"$((i*10))"PERC"
break
fi
done
lib/rdk/readBTAddress-generic.sh:31
- If
BLUETOOTH_ENABLEDis nottrue, this script prints an empty line.getDeviceDetails.shexpects a MAC string; returning empty can propagate incorrect data. Prefer emitting a stable default when Bluetooth is disabled/unavailable.
lib/rdk/startStunnel.sh:116 checkHostis written twice (first$JUMP_FQDN, then$DEV_SAN/$PROD_SAN). MultiplecheckHostentries are ambiguous and can cause stunnel to validate against the wrong hostname depending on how duplicates are handled. Emit exactly onecheckHostbased on device type (and fall back to$JUMP_FQDNonly when type is unknown).
lib/rdk/startStunnel.sh:162- Using
mktemp -uto pick a FIFO path is vulnerable to TOCTOU races (another process can create that path between name generation andmkfifo). Also, errors frommkfifoaren’t handled as fatal (the script continues). Consider usingmktempwithout-uand failing fast if FIFO creation/open fails.
lib/rdk/startStunnel.sh:173 PASSCODEis evaluated viaevaland written to an arbitrary FD in the background. IfPASSCODEcan be influenced (directly or indirectly), this enables command injection. Prefer treating the passcode as data (noeval) and validating it is set before writing.
lib/rdk/timesyncd-conf-update.sh:140- After updating
/etc/systemd/timesyncd.conf, the script no longer restartssystemd-timesyncd.systemd-timesyncdwon’t pick up config changes until restart, so the new NTP servers may never be applied during the current boot.
lib/rdk/alertSystem.sh:107 MSG_DATAand other fields are interpolated into JSON without escaping. If the alert message contains quotes, backslashes, or newlines, the payload becomes invalid JSON (and can potentially be used for JSON injection into downstream systems).
if [ "x$PROCESS_NAME" == "xdeepSleepMgrMain" ]; then
# Message data is actual metadata header in case of trigger from deepSleep manager process
# This change is needed since there are data clouds in different deployment which are not flexible to accomodate any deviations in data format
strjson="{\"searchResult\":[{\"Time\":\"$currentTime\"},{\"process_name\":\"$PROCESS_NAME\"},{\"mac\":\"$estb_mac\"},{\"Version\":\"$software_version\"},{\"PartnerId\":\"$partnerId\"},{\"$MSG_DATA\":\"1\"}]}"
else
strjson="{\"searchResult\":[{\"process_name\":\"$PROCESS_NAME\"},{\"mac\":\"$estb_mac\"},{\"Version\":\"$software_version\"},{\"msgTime\":\"$currentTime\"},{\"PartnerId\":\"$partnerId\"},{\"logEntry\":\"$MSG_DATA\"}]}"
fi
Comment on lines
+25
to
+31
| powerState=$(/usr/bin/QueryPowerState) | ||
|
|
||
| if [ "$powerState" != "DEEPSLEEP" ]; then | ||
| boardTemp=`/bin/cat /sys/class/thermal/thermal_zone0/temp | sed 's/./&./2'`c | ||
| else | ||
| boardTemp="Device in Deepsleep" | ||
| fi |
Comment on lines
+124
to
133
| if [ -z "$PSK" ]; then | ||
| #connect to wifi | ||
| nmcli conn add type wifi con-name "$SSID" autoconnect yes ifname wlan0 ssid "$SSID" | ||
| nmcli conn reload | ||
| else | ||
| #connect to wifi | ||
| nmcli conn add type wifi con-name "$SSID" autoconnect yes ifname wlan0 ssid "$SSID" wifi-sec.key-mgmt "$KEY_MGMT" wifi-sec.psk "$PSK" | ||
| nmcli conn reload | ||
| fi | ||
| fi |
…nly/IPv6-only networks (#581) * DELIA-70624: updated to reset counters only if gateway is available for ipv6. Signed-off-by: Balaji Punnuru <Balaji_Punnuru@comcast.com> * DELIA-70624: Added debug in the script Signed-off-by: Balaji Punnuru <Balaji_Punnuru@comcast.com> * DELIA-70624: networkConnectionRecovery: presence-aware packet-loss recovery trigger Recovery now fires only when no routed IP stack has acceptable connectivity and at least one routed stack is at/above the reassociate tolerance. This fixes the IPv4-only / IPv6-only case where a stack with no default route left packetsLost at 0 and suppressed recovery. Also folded in reliability/logging fixes: - clear stale gwIp on the V6 test-hook path - guard packet-loss comparisons against unparseable ping output - emit SYST_WARN_GW100PERC_PACKETLOSS to the logs file on every run - ping the IPv4 default-route interface explicitly (ping -I) - log total ipv4/ipv6 packet loss when above threshold - simplify the trigger to anyGood/anyBad classification * DELIA-70624: networkConnectionRecovery: add log() helper and per-call packet-loss fix - Introduce a log() helper that prepends the timestamp and appends to $logsFile, and convert the timestamped echo call sites to use it. - Rename packetsLostipv4/packetsLostipv6 globals to ipv4PacketLoss/ipv6PacketLoss for clarity. - Reset the per-call packetLoss to "" at the top of checkPacketLoss and guard the packet-loss telemetry block with [ -n "$packetLoss" ], so a routeless or unparseable ping no longer reuses the other family's value or triggers integer-comparison errors. - Fix a "[" spacing bug in checkWifiDrvErrors. Telemetry markers and t2CountNotify calls are unchanged. * DELIA-70624: networkConnectionRecovery: log route/loss snapshot on state change Emit a "network state changed" line with the per-stack route-present flags and packet-loss values only when the snapshot differs from the previous run (persisted in /tmp/.ncr_laststate), so field logs capture every transition without printing on every run. Debugging aid for customer-site triage. * DELIA-70624: remove debug logging and make script POSIX/busybox-sh safe - Drop the temporary DEBUG_NCR field-debug logging; retain the "network state changed" transition log (now unprefixed). - checkWifiDrvErrors(): $dir already holds the full debugfs path, so remove the duplicated /sys/kernel/debug/ieee80211/ prefix from the log messages, and capture the cat exit status so the failure log reports the real status instead of the enclosing test's result. - Replace bashisms with POSIX/busybox-ash equivalents: source -> ., [[ =~ ]] -> case, [[ ]] -> [ ], and {1..9} -> explicit list (the brace form never expands under busybox ash, which had left the WIFIV_WARN_PL_20..90PERC packet-loss markers non-functional on target). - Minor whitespace cleanup in checkDnsFile(). * DELIA-70624: restore 100% packet-loss triage marker and fix marker case Reinstate the field-triage log marker for 100% packet loss that was lost when checkPacketLoss() moved to a tolerance-based recovery decision. The new log-only marker "100% Packet loss is observed on all routed IP stacks" fires when every routed IP stack shows exactly 100% loss. It is independent of WifiReassociateTolerance and does not alter the recovery/return path, so recovery behaviour is unchanged. Unlike the legacy dual-stack "...for both ipv4 and ipv6" print, it is also emitted correctly on IPv4-only and IPv6-only networks. Triage associates the old and new strings to the same 100%-packet-loss marker for trend continuity across images. Also capitalise the "Packet loss more than 10% observed" marker (was lowercase "packet loss ...") since triage marker matching is case-sensitive. --------- Signed-off-by: Balaji Punnuru <Balaji_Punnuru@comcast.com> Co-authored-by: Balaji Punnuru <Balaji_Punnuru@comcast.com>
Sysint release for 8.4 hotfix
* RDK-61784:Model specific sshkeys for RDKE active platforms Reason for change:Switch keys only in prod builds Test Procedure: Build and verify. Risks: None Priority: P1 * Update Start_MaintenanceTasks.sh * Revert "Rebase " --------- Co-authored-by: NareshM1702 <risingphoenix785@gmail.com>
…nly/IPv6-only networks (#570) * DELIA-70624: Updated Script to reset counters only if gateway is enabled. Signed-off-by: Balaji Punnuru <Balaji_Punnuru@comcast.com> * DELIA-70624: networkConnectionRecovery: presence-aware packet-loss recovery trigger Recovery now fires only when no routed IP stack has acceptable connectivity and at least one routed stack is at/above the reassociate tolerance. This fixes the IPv4-only / IPv6-only case where a stack with no default route left packetsLost at 0 and suppressed recovery. Also folded in reliability/logging fixes: - clear stale gwIp on the V6 test-hook path - guard packet-loss comparisons against unparseable ping output - emit SYST_WARN_GW100PERC_PACKETLOSS to the logs file on every run - ping the IPv4 default-route interface explicitly (ping -I) - log total ipv4/ipv6 packet loss when above threshold - simplify the trigger to anyGood/anyBad classification * DELIA-70624: networkConnectionRecovery: add log() helper and per-call packet-loss fix - Introduce a log() helper that prepends the timestamp and appends to $logsFile, and convert the timestamped echo call sites to use it. - Rename packetsLostipv4/packetsLostipv6 globals to ipv4PacketLoss/ipv6PacketLoss for clarity. - Reset the per-call packetLoss to "" at the top of checkPacketLoss and guard the packet-loss telemetry block with [ -n "$packetLoss" ], so a routeless or unparseable ping no longer reuses the other family's value or triggers integer-comparison errors. - Fix a "[" spacing bug in checkWifiDrvErrors. Telemetry markers and t2CountNotify calls are unchanged. * DELIA-70624: networkConnectionRecovery: log route/loss snapshot on state change Emit a "network state changed" line with the per-stack route-present flags and packet-loss values only when the snapshot differs from the previous run (persisted in /tmp/.ncr_laststate), so field logs capture every transition without printing on every run. Debugging aid for customer-site triage. * DELIA-70624: remove debug logging and make script POSIX/busybox-sh safe - Drop the temporary DEBUG_NCR field-debug logging; retain the "network state changed" transition log (now unprefixed). - checkWifiDrvErrors(): $dir already holds the full debugfs path, so remove the duplicated /sys/kernel/debug/ieee80211/ prefix from the log messages, and capture the cat exit status so the failure log reports the real status instead of the enclosing test's result. - Replace bashisms with POSIX/busybox-ash equivalents: source -> ., [[ =~ ]] -> case, [[ ]] -> [ ], and {1..9} -> explicit list (the brace form never expands under busybox ash, which had left the WIFIV_WARN_PL_20..90PERC packet-loss markers non-functional on target). - Minor whitespace cleanup in checkDnsFile(). * DELIA-70624: restore 100% packet-loss triage marker and fix marker case Reinstate the field-triage log marker for 100% packet loss that was lost when checkPacketLoss() moved to a tolerance-based recovery decision. The new log-only marker "100% Packet loss is observed on all routed IP stacks" fires when every routed IP stack shows exactly 100% loss. It is independent of WifiReassociateTolerance and does not alter the recovery/return path, so recovery behaviour is unchanged. Unlike the legacy dual-stack "...for both ipv4 and ipv6" print, it is also emitted correctly on IPv4-only and IPv6-only networks. Triage associates the old and new strings to the same 100%-packet-loss marker for trend continuity across images. Also capitalise the "Packet loss more than 10% observed" marker (was lowercase "packet loss ...") since triage marker matching is case-sensitive. --------- Signed-off-by: Balaji Punnuru <Balaji_Punnuru@comcast.com> Co-authored-by: Balaji Punnuru <Balaji_Punnuru@comcast.com>
…rty files in /etc (#582) Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com> Co-authored-by: nhanasi <navihansi@gmail.com>
Sysint Release for 6.0.2 develop
Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 65 out of 65 changed files in this pull request and generated 1 comment.
Suppressed comments (4)
lib/rdk/getDeviceDetails.sh:50
- The file existence check looks in
/lib/rdk/utils-vendor.shbut the script then sources$RDK_PATH/utils-vendor.sh. IfRDK_PATHis not/lib/rdk, this will incorrectly try to source a non-existent path even though the check passed.
if [ -f /lib/rdk/utils-vendor.sh ]; then
. $RDK_PATH/utils-vendor.sh
fi
lib/rdk/timesyncd-conf-update.sh:66
get_bs_valusesgrep -Ewith$keyunescaped. Because$keycontains dots (e.g.,Device.Time.NTPServer1),.is treated as “any character” and can match the wrong keys in bootstrap.ini.
lib/rdk/alertSystem.sh:23- This header says the script “is used to backup the Logs”, but this file implements an alert/telemetry POST. The purpose/scope/usage comment block should match the actual behavior to avoid operational confusion.
# Purpose: This script is used to backup the Logs
# Scope: RDK devices
# Usage: This script is triggered by systemd service
##############################################################################
lib/rdk/alertSystem.sh:113
CURL_INPUTembeds the JSON payload using single quotes (-d '$strjson'). If the payload contains a single quote, this will break shell quoting and can alter the curl command. Use double quotes around the expanded JSON instead.
if [ -f $EnableOCSPStapling ] || [ -f $EnableOCSP ]; then
CURL_INPUT=" -w '%{http_code}\n' -H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST -d '$strjson' -o \"$HTTP_FILENAME\" \"$UPLOAD_END_POINT\" --cert-status --connect-timeout 30 -m 30 "
else
CURL_INPUT=" -w '%{http_code}\n' -H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST -d '$strjson' -o \"$HTTP_FILENAME\" \"$UPLOAD_END_POINT\" --connect-timeout 30 -m 30 "
fi
Comment on lines
+77
to
89
| if [ "BUILD_TYPE" != "dev" ]; then | ||
| DEVICETYPE=$(tr181 -d Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Identity.DeviceType 2>&1 > /dev/null) | ||
| if [ "$DEVICETYPE" = "TEST" ]; then | ||
| USE_DEVKEYS="-f authorized_keys_dev" | ||
| echo " dropbear using dev authorization keys" | ||
| else | ||
| USE_DEVKEYS="" | ||
| echo " dropbear using prod authorization keys" | ||
| fi | ||
| else | ||
| USE_DEVKEYS="" | ||
| echo " dropbear using prod authorization keys" | ||
| echo " Build type is dev , use dev authorization keys by default" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.