Rebase feature/RDKEMW-8178 branch inline with develop#434
Rebase feature/RDKEMW-8178 branch inline with develop#434KTirumalaSrihari wants to merge 209 commits into
Conversation
Sysint Release for Develop
…ution Update rebootNow.sh
Update CODEOWNERS
…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
There was a problem hiding this comment.
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_ENABLEDis nottrue,bluetooth_macis 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 (like00:00:00:00:00:00) when Bluetooth is disabled or whengetDeviceBluetoothMacreturns empty.
| #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 | ||
| } |
| # Purpose: This script is used to backup the Logs | ||
| # Scope: RDK devices | ||
| # Usage: This script is triggered by systemd service |
|
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.
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.
| 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:]]*$//' | ||
| } |
| # 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" | ||
|
|
| # Purpose: This script is used to backup the Logs | ||
| # Scope: RDK devices | ||
| # Usage: This script is triggered by systemd service |
| # 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 |
Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
There was a problem hiding this comment.
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_macis never initialized, so the script prints an empty string.getDeviceDetails.shexpects a valid MAC-like value (it defaults to00:00:00:00:00:00), so returning empty here can break downstream consumers.
| 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 |
| # 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" |
| 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 |
| if [ -f /lib/rdk/utils-vendor.sh ]; then | ||
| . $RDK_PATH/utils-vendor.sh | ||
| fi |
* 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>
There was a problem hiding this comment.
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_ENABLEDis nottrue, 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/shscript, andifconfigis invoked with an unquoted interface name. For POSIX/bin/shcompatibility 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
| if [ -f /lib/rdk/utils-vendor.sh ]; then | ||
| . $RDK_PATH/utils-vendor.sh | ||
| fi |
| 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 |
| # 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 & |
| [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" |
| 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 |
| 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 |
| cat /tmp/timesyncd.conf > /etc/systemd/timesyncd.conf | ||
| rm -rf /tmp/timesyncd.conf |
| # Purpose: This script is used to backup the Logs | ||
| # Scope: RDK devices | ||
| # Usage: This script is triggered by systemd service |
| # 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>
There was a problem hiding this comment.
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.
| if [ -f /lib/rdk/utils-vendor.sh ]; then | ||
| . $RDK_PATH/utils-vendor.sh | ||
| fi |
| 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 | ||
|
|
| # 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 & |
| 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 |
| 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 |
No description provided.