Skip to content

Rebase feature/RDKEMW-8178 branch inline with develop#434

Open
KTirumalaSrihari wants to merge 209 commits into
feature/RDKEMW-8178from
develop
Open

Rebase feature/RDKEMW-8178 branch inline with develop#434
KTirumalaSrihari wants to merge 209 commits into
feature/RDKEMW-8178from
develop

Conversation

@KTirumalaSrihari

Copy link
Copy Markdown
Contributor

No description provided.

rdkcmf-jenkins and others added 30 commits June 24, 2025 15:09
Sysint Release for Develop
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
Release tag for sysint repo

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

lib/rdk/readBTAddress-generic.sh:31

  • If BLUETOOTH_ENABLED is not true, bluetooth_mac is never set and the script prints an empty line. Since callers (e.g., getDeviceDetails.sh) fall back to this script to obtain the BT MAC, consider printing a deterministic default (like 00:00:00:00:00:00) when Bluetooth is disabled or when getDeviceBluetoothMac returns empty.

Comment thread lib/rdk/startStunnel.sh
Comment on lines +134 to +151
#Function to find available fd at this point in time
get_next_fd() {
local fd=3 # Start checking from FD 3 (since 0, 1, 2 are standard in/out/err)
local max_fd=20 # Maximum FD to check

# Try to redirect to /dev/null and check if the FD is free
while [ $fd -le $max_fd ]; do
if ! { true >&$fd; } 2>/dev/null; then
echo "$fd" # Output the available FD (goes to standard output)
return 0 # Set exit status to success
fi
fd=$((fd + 1))
done

# Log failure if no free FD is found
echo "Error: No available file descriptor found up to FD $max_fd" >&2
return 1 # Set exit status to failure
}
Comment thread lib/rdk/alertSystem.sh
Comment on lines +20 to +22
# Purpose: This script is used to backup the Logs
# Scope: RDK devices
# Usage: This script is triggered by systemd service
Copilot AI review requested due to automatic review settings May 14, 2026 16:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 59 changed files in this pull request and generated no new comments.

@github-advanced-security

Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI review requested due to automatic review settings June 29, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 62 out of 62 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

lib/rdk/readBTAddress-generic.sh:31

  • When BLUETOOTH_ENABLED is not true, bluetooth_mac is never initialized, so the script prints an empty string. This causes getDeviceDetails.sh to return an empty Bluetooth MAC instead of the expected default value.

Comment on lines +61 to +66
get_bs_val() {
key="$1"
# Extract RHS after '=' and trim whitespace
grep -m1 -E "^[[:space:]]*$key=" "$BOOTSTRAP" 2>/dev/null | \
cut -d'=' -f2- | sed 's/^[[:space:]]*//; s/[[:space:]]*$//'
}
Comment thread lib/rdk/startStunnel.sh
Comment on lines +158 to +171
# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

Comment thread lib/rdk/alertSystem.sh
Comment on lines +20 to +22
# Purpose: This script is used to backup the Logs
# Scope: RDK devices
# Usage: This script is triggered by systemd service
Comment thread lib/rdk/startLinkLocal.sh
Comment on lines +36 to +45
# Validate input and restrict to eth0 or wlan0
if [ -z "$INTERFACE" ]; then
Log "ERROR: No interface specified"
exit 1
fi

if [ "$INTERFACE" != "$ETHERNET_INTERFACE" ] && [ "$INTERFACE" != "$WIFI_INTERFACE" ]; then
Log "INFO: Link-local not started for $INTERFACE (only eth0 and wlan0 allowed)"
exit 0
fi
Copilot AI review requested due to automatic review settings July 5, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 62 out of 62 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

lib/rdk/readBTAddress-generic.sh:31

  • When Bluetooth is disabled, bluetooth_mac is never initialized, so the script prints an empty string. getDeviceDetails.sh expects a valid MAC-like value (it defaults to 00:00:00:00:00:00), so returning empty here can break downstream consumers.

Comment thread lib/rdk/startStunnel.sh
Comment on lines +103 to 106
if [ ! -f $CERT_PATH -o ! -f $CA_FILE ]; then
echo_t "STUNNEL: Required cert/CA file not found. Exiting..."
t2CountNotify "SHORTS_STUNNEL_CERT_FAILURE"
exit 1
Comment thread lib/rdk/startStunnel.sh
Comment on lines +158 to +170
# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"
Comment on lines +268 to +275
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
fi
Comment on lines +48 to +50
if [ -f /lib/rdk/utils-vendor.sh ]; then
. $RDK_PATH/utils-vendor.sh
fi
apatel859 and others added 2 commits July 7, 2026 14:35
* RDKEMW-21159: avoid thermal call in deepsleep



* Apply suggestions from code review



---------

Signed-off-by: apatel859 <Amit_Patel5@comcast.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 15, 2026 13:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 63 out of 63 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (2)

lib/rdk/readBTAddress-generic.sh:31

  • When BLUETOOTH_ENABLED is not true, this script prints an empty string, which causes callers to lose their default value. Consider always emitting a well-defined MAC value (e.g. 00:00:00:00:00:00) when Bluetooth is disabled.
    lib/rdk/NM_Dispatcher.sh:207
  • These comparisons use == in a #!/bin/sh script, and ifconfig is invoked with an unquoted interface name. For POSIX /bin/sh compatibility and safer argument handling, use = and quote $interfaceName.
    if [ "$interfaceStatus" == "dhcp4-change" ]; then
        /usr/sbin/avahi-autoipd --kill "$interfaceName" 2>/dev/null
        mode="ipv4"
        gwip=$(/sbin/ip -4 route | awk '/default/ { print $3 }' | head -n1 | awk '{print $1;}')
        imode=2
        ipaddr=$(ifconfig $interfaceName | grep -w inet | awk -F ' ' '{print $2}' | awk -F ':' '{print $2}')
    elif [ "$interfaceStatus" == "dhcp6-change" ]; then

Comment on lines +48 to +50
if [ -f /lib/rdk/utils-vendor.sh ]; then
. $RDK_PATH/utils-vendor.sh
fi
Comment on lines +285 to 289
if [ -f /lib/rdk/readBTAddress-vendor.sh ]; then
bluetooth_mac=`sh /lib/rdk/readBTAddress-vendor.sh`
else
bluetooth_mac=`sh /lib/rdk/readBTAddress-generic.sh`
fi
Comment thread lib/rdk/startStunnel.sh
Comment on lines +158 to +173
# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

# Writing passcode to open file descriptor
echo "$(eval "$PASSCODE")" >&$FD_NUMBER &
Comment on lines +1 to +8
[Unit]
Description=Log Internet connectivity and Trigger network target
After=dbus.service

[Service]
Type=oneshot
ExecStartPre=/bin/touch /tmp/connectivity_check_done
ExecStart=/lib/rdk/logMilestone.sh "INTERNET_FULLY_CONNECTED"
Comment thread lib/rdk/NM_Dispatcher.sh
Comment on lines +60 to +69
if [ "x$mode" == "xipv6" ]; then
if [[ $addr == fc* || $addr == fd* ]]; then
return 1
fi
elif [ "x$mode" == "xipv4" ]; then
autoIPTrunc=$(echo $addr | cut -d "." -f1-2)
if [ "$autoIPTrunc" == "169.254" ]; then
return 1
fi
fi
Comment thread lib/rdk/NM_preDown.sh
Comment on lines +87 to +99
if [[ "$ifc" == "$ESTB_INTERFACE" || "$ifc" == "$DEFAULT_ESTB_INTERFACE" || "$ifc" == "$ESTB_INTERFACE:0" ]]; then
NMdispatcherLog "Updating Box/ESTB IP"
rm -f /tmp/.$mode$ESTB_INTERFACE
refresh_devicedetails "estb_ip"
elif [[ "$ifc" == "$MOCA_INTERFACE" || "$ifc" == "$MOCA_INTERFACE:0" ]]; then
NMdispatcherLog "Updating MoCA IP"
rm -f /tmp/.$mode$MOCA_INTERFACE
refresh_devicedetails "moca_ip"
elif [[ "$ifc" == "$WIFI_INTERFACE" || "$ifc" == "$WIFI_INTERFACE:0" ]]; then
NMdispatcherLog "Updating Wi-Fi IP"
rm -f /tmp/.$mode$WIFI_INTERFACE
refresh_devicedetails "boxIP"
fi
Comment on lines 139 to 140
cat /tmp/timesyncd.conf > /etc/systemd/timesyncd.conf
rm -rf /tmp/timesyncd.conf
Comment thread lib/rdk/alertSystem.sh
Comment on lines +20 to +22
# Purpose: This script is used to backup the Logs
# Scope: RDK devices
# Usage: This script is triggered by systemd service
Comment thread lib/rdk/alertSystem.sh
Comment on lines +96 to +107
# Device attributes
estb_mac=$(getEstbMacAddress)
software_version=`grep ^imagename: /version.txt | cut -d ':' -f2`


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
…twork Connectivity Prior to Migration Completion (#571)

Co-authored-by: mtirum011 <madhubabu_tirumala@comcast.com>
Copilot AI review requested due to automatic review settings July 15, 2026 14:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 63 out of 63 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

lib/rdk/readBTAddress-generic.sh:31

  • bluetooth_mac is only set when BLUETOOTH_ENABLED=true; otherwise the script echoes an empty value. This propagates to callers (e.g., getDeviceDetails.sh) and can result in an empty Bluetooth MAC instead of a stable default.

Comment on lines +48 to +50
if [ -f /lib/rdk/utils-vendor.sh ]; then
. $RDK_PATH/utils-vendor.sh
fi
Comment thread lib/rdk/startStunnel.sh
Comment on lines +112 to +116
echo "cert = $CERT_PATH" >> $STUNNEL_CONF_FILE
echo "CAfile = $CA_FILE" >> $STUNNEL_CONF_FILE
echo "verifyChain = yes" >> $STUNNEL_CONF_FILE
SERVERTYPE=`tr181 -g Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Identity.DeviceType 2>&1`
if [ ! -z "$SERVERTYPE" ]; then
if [ "$SERVERTYPE" == "TEST" ]; then
echo "checkHost = $JUMP_FQDN" >> $STUNNEL_CONF_FILE

Comment thread lib/rdk/startStunnel.sh
Comment on lines +158 to +173
# Create a named pipe
PIPE=$(mktemp -u)
if ! mkfifo "$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to create named pipe"
fi

# Open the pipe using the available FD, with error handling
if ! eval "exec $FD_NUMBER<>$PIPE" 2>/dev/null; then
echo_t "STUNNEL: ERROR - Failed to open pipe with file descriptor"
fi

# Removing the pipe after opening
rm "$PIPE"

# Writing passcode to open file descriptor
echo "$(eval "$PASSCODE")" >&$FD_NUMBER &
Comment on lines +217 to 231
if [ -f "/tmp/checkpacketloss" ] ; then
if [ "$version" = "V4" ] ; then
gwIp=$(cat /tmp/checkpacketloss)
pingCmd="ping"
fi
else
#print ipv4 Gateway logs after $GatewayLoggingInterval
if [ "$(($GatewayLogTimeStamp+$GatewayLoggingInterval))" -le "$currentTime" ] ; then
echo "$(/bin/timestamp) TELEMETRY_GATEWAY_NO_ROUTE_V4" >> "$logsFile"
t2CountNotify "WIFIV_INFO_NOV4ROUTE"
if [ "$version" = "V4" ] ; then
gwIp=$(/sbin/ip -4 route | awk '/default/ { print $3 }' | head -n1 | awk '{print $1;}')
pingCmd="ping"
elif [ "$version" = "V6" ] ; then
gwIp=$(/sbin/ip -6 route | awk '/default/ { print $3 }' | head -n1 | awk '{print $1;}')
gwIp_interface=$(/sbin/ip -6 route | awk '/default/ { print $5 }' | head -n1 | awk '{print $1;}')
pingCmd="ping6 -I $gwIp_interface"
fi
fi
Comment on lines +268 to +275
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
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.