Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions DCMscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ HTTP_CODE=/tmp/.dcm_http_code
RETRY_DELAY=60
MAX_SSH_RETRY=3

UseLANIFIPV6=`sysevent get LANIPv6GUASupport`

if [ "x$BOX_TYPE" = "xSR300" ] ;then
while :
do
Expand Down Expand Up @@ -457,12 +455,8 @@ sendHttpRequestToServer()

# If interface doesnt have ipv6 address then we will force the curl to go with ipv4.
# Otherwise we will not specify the ip address family in curl options
if [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "x$BOX_TYPE" = "xSE501" ] || [ "x$BOX_TYPE" = "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
addr_type=""
else
addr_type=""
[ "x`ifconfig $EROUTER_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi
addr_type=""
[ "x`ifconfig $EROUTER_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
partnerId=$(getPartnerId)
accountId=$(getAccountId)
if [ $MODEL_NUM = "WNXL11BWL" ]; then
Expand Down
12 changes: 1 addition & 11 deletions dcaSplunkUpload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ DCMRESPONSE="$PERSISTENT_PATH/DCMresponse.txt"

PEER_COMM_ID="/tmp/elxrretyt-dcas.swr"

UseLANIFIPV6=`sysevent get LANIPv6GUASupport`

if [ ! -f /usr/bin/GetConfigFile ];then
echo "Error: GetConfigFile Not Found"
Expand Down Expand Up @@ -357,16 +356,7 @@ cur_time=`date "+%Y-%m-%d %H:%M:%S"`
# If interface doesnt have ipv6 address then we will force the curl to go with ipv4.
# Otherwise we will not specify the ip address family in curl options
addr_type=""
if [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "x$BOX_TYPE" = "xSE501" ] || [ "x$BOX_TYPE" = "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
[ "x`ifconfig $HUB4_IPV6_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`" != "x" ] || addr_type="-4"
else
[ "x`ifconfig $EROUTER_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi
else
[ "x`ifconfig $EROUTER_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi
[ "x`ifconfig $EROUTER_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
if [ "x$DCA_MULTI_CORE_SUPPORTED" = "xyes" ]; then
## 1] Pull processed data from ATOM
rm -f $TELEMETRY_JSON_RESPONSE
Expand Down
11 changes: 0 additions & 11 deletions onboardLogUpload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ CODEBIG_MAX_ATTEMPTS=3
EnableOCSPStapling="/tmp/.EnableOCSPStapling"
EnableOCSP="/tmp/.EnableOCSPCA"

UseLANIFIPV6=`sysevent get LANIPv6GUASupport`

if [ -f $EnableOCSPStapling ] || [ -f $EnableOCSP ]; then
CERT_STATUS="--cert-status"
fi
Expand Down Expand Up @@ -241,16 +239,7 @@ uploadOnboardLogs()
# If interface doesnt have ipv6 address then we will force the curl to go with ipv4.
# Otherwise we will not specify the ip address family in curl options
addr_type=""
if [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" == "xSR213" ] || [ "x$BOX_TYPE" == "xSE501" ] || [ "x$BOX_TYPE" == "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
[ "x`ifconfig $HUB4_IPV6_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`" != "x" ] || addr_type="-4"
else
[ "x`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi
else
[ "x`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi

S3_URL=$UploadHttpLink
S3_MD5SUM=""
Expand Down
12 changes: 1 addition & 11 deletions opsLogUpload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ source /etc/device.properties
source /lib/rdk/getpartnerid.sh
source $RDK_LOGGER_PATH/logUpload_default_params.sh

UseLANIFIPV6=`sysevent get LANIPv6GUASupport`

if [ -f /nvram/logupload.properties -a $BUILD_TYPE != "prod" ];then
. /nvram/logupload.properties
fi
Expand Down Expand Up @@ -302,16 +300,8 @@ HTTPLogUploadOnRequest()
# If interface doesnt have ipv6 address then we will force the curl to go with ipv4.
# Otherwise we will not specify the ip address family in curl options
addr_type=""
if [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" == "xSR213" ] || [ "x$BOX_TYPE" == "xSE501" ] || [ "x$BOX_TYPE" == "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
[ "x`ifconfig $HUB4_IPV6_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`" != "x" ] || addr_type="-4"
else
[ "x`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi
else
[ "x`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi


UploadFile=`ls | grep "tgz"`
echo_t "files to be uploaded is : $UploadFile"
Expand Down
26 changes: 3 additions & 23 deletions startTunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@

source /etc/waninfo.sh

UseLANIFIPV6=`sysevent get LANIPv6GUASupport`


if [ -f /lib/rdk/t2Shared_api.sh ]; then
source /lib/rdk/t2Shared_api.sh
fi
Expand Down Expand Up @@ -70,26 +67,9 @@ case $oper in
IpCheckVal=$(echo ${CM_IPV4} | tr "." " " | awk '{ print $3"."$4 }')
Check=$(ip_to_hex $IpCheckVal)
# getting the IPV6 address for CM
if [ "$BOX_TYPE" = "SCER11BEL" -a "$UseLANIFIPV6" = "true" ] ; then
if [ -z "$CM_IPV4" ]; then
# In IPv6 only case (MAP-T), and if IPv6 GUA on LAN enabled case, use brlan0 interface to get v6 global address.
CM_IP=`ip -6 addr show dev brlan0 scope global | awk '/inet/{print $2}' | cut -d '/' -f1 | head -n1`
else
CM_IP=$CM_IPV4
fi
echo "CM_IP-$CM_IP"
# creating a ssh tunnel directly to the LANIP:22 for IPV6 only scenario
elif [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "x$BOX_TYPE" = "xSE501" ] || [ "x$BOX_TYPE" = "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
if [ -z "$CM_IPV4" ]; then
CM_IP=`syscfg get lan_ipaddr`
else
CM_IP=$CM_IPV4
fi
else
CM_IP=`ifconfig $WAN_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1`
if [ -z "$CM_IP" ]; then
CM_IP=$CM_IPV4
fi
CM_IP=`ifconfig $WAN_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1`
if [ -z "$CM_IP" ]; then
CM_IP=$CM_IPV4
Comment on lines +70 to +72
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

In the ETHWAN_ENABLE path, CM_IP is now derived only from the WAN interface’s Global IPv6 address. This drops the prior LANIPv6GUASupport / SCER11BEL IPv6-only (MAP-T) handling that explicitly used brlan0’s GUA when CM_IPV4 is empty, so reverse-SSH may fail to get any reachable address in that scenario. Consider reintroducing that IPv6-only logic (or delegating to getCMIPAddress from utils.sh), and also ensure the command selects a single IPv6 (e.g., first match) to avoid CM_IP becoming multi-line when multiple Global addresses are present.

Suggested change
CM_IP=`ifconfig $WAN_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1`
if [ -z "$CM_IP" ]; then
CM_IP=$CM_IPV4
CM_IP=`ifconfig $WAN_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`
if [ -z "$CM_IP" ]; then
if [ -z "$CM_IPV4" ]; then
# IPv6-only/MAP-T handling: use brlan0 GUA when WAN IPv4 is unavailable
CM_IP=`ifconfig brlan0 | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`
fi
if [ -z "$CM_IP" ]; then
CM_IP=$CM_IPV4
fi

Copilot uses AI. Check for mistakes.
fi
else
if ( [ "$MANUFACTURE" = "Technicolor" ] || [ "$MANUFACTURE" = "Sercomm" ] ) && [ "$BOX_TYPE" != "XB3" ]; then
Expand Down
46 changes: 10 additions & 36 deletions uploadRDKBLogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ partnerId="$(getPartnerId)"
unscheduledDisable=`syscfg get UploadLogsOnUnscheduledRebootDisable`
UPLOAD_LOGS=`sysevent get UPLOAD_LOGS_VAL_DCM`

UseLANIFIPV6=`sysevent get LANIPv6GUASupport`

if [ "$UPLOAD_LOGS" = "" ] || [ ! -f "$DCM_SETTINGS_PARSED" ]
then
Expand Down Expand Up @@ -250,19 +249,10 @@ retryUpload()
sleep 10
WAN_INTERFACE=$(getWanInterfaceName)
WAN_STATE=`sysevent get wan-status`
if [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "x$BOX_TYPE" = "xSE501" ] || [ "x$BOX_TYPE" = "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
EROUTER_IP=`ifconfig $HUB4_IPV6_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`
else
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep "inet addr" | cut -d":" -f2 | cut -d" " -f1`
fi
else
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`
if [ "$EROUTER_IP" = "" ]; then
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep "inet addr" | cut -d":" -f2 | cut -d" " -f1`
fi
fi
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`
if [ "$EROUTER_IP" = "" ]; then
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep "inet addr" | cut -d":" -f2 | cut -d" " -f1`
fi
SYSEVENT_PID=`pidof syseventd`
if [ -f $WAITINGFORUPLOAD ]
then
Expand Down Expand Up @@ -475,16 +465,8 @@ HttpLogUpload()
# If interface doesnt have ipv6 address then we will force the curl to go with ipv4.
# Otherwise we will not specify the ip address family in curl options
addr_type=""
if [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "x$BOX_TYPE" = "xSE501" ] || [ "x$BOX_TYPE" = "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
[ "x`ifconfig $HUB4_IPV6_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`" != "x" ] || addr_type="-4"
else
[ "x`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi
else
[ "x`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"
fi
[ "x`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`" != "x" ] || addr_type="-4"

# Upload logs to "LOG_BACK_UP_REBOOT" upon reboot else to the default path "LOG_BACK_UP_PATH"
if [ "$UploadOnReboot" == "true" ]; then
if [ "$nvram2Backup" == "true" ]; then
Expand Down Expand Up @@ -876,19 +858,11 @@ touch $REGULAR_UPLOAD
if [ "$UploadProtocol" = "HTTP" ]
then
WAN_STATE=`sysevent get wan-status`
if [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "x$BOX_TYPE" = "xSE501" ] || [ "x$BOX_TYPE" = "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
EROUTER_IP=`ifconfig $HUB4_IPV6_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`
else
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep "inet addr" | cut -d":" -f2 | cut -d" " -f1`

EROUTER_IP=`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`
if [ "$EROUTER_IP" = "" ]; then
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep "inet addr" | cut -d":" -f2 | cut -d" " -f1`
fi
else
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep inet6 | grep -i 'Global'`
if [ "$EROUTER_IP" = "" ]; then
EROUTER_IP=`ifconfig $WAN_INTERFACE | grep "inet addr" | cut -d":" -f2 | cut -d" " -f1`
fi
fi
SYSEVENT_PID=`pidof syseventd`
if [ "$WAN_STATE" == "started" ] && [ "$EROUTER_IP" != "" ]
then
Expand Down
25 changes: 6 additions & 19 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,11 @@ getSHA1()
# IP address of the machine
getIPAddress()
{
if [ "x$BOX_TYPE" = "xHUB4" ] || [ "x$BOX_TYPE" = "xSR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "x$BOX_TYPE" = "xSE501" ] || [ "x$BOX_TYPE" = "xWNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then

CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
wanIP=`ifconfig $HUB4_IPV6_INTERFACE | grep Global | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`
else
wanIP=`ifconfig $WANINTERFACE | grep "inet addr" | grep -v inet6 | cut -f2 -d: | cut -f1 -d" "`
fi
else
wanIP=`ifconfig $WANINTERFACE | grep "inet addr" | grep -v inet6 | cut -f2 -d: | cut -f1 -d" "`
wanIP=`ifconfig $WANINTERFACE | grep inet6 | grep -i 'Global' | awk '/inet6/{print $3}' | cut -d '/' -f1 | head -n1`
if [ -z "$wanIP" ]; then
wanIP=`ifconfig $WANINTERFACE | grep "inet addr" | grep -v inet6 | cut -f2 -d: | cut -f1 -d" "`
fi

echo $wanIP
}

Expand All @@ -116,7 +110,7 @@ getCMIPAddress()
elif [ "$BOX_TYPE" = "HUB4" ] || [ "$BOX_TYPE" = "SR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "$BOX_TYPE" = "SE501" ] || [ "$BOX_TYPE" = "WNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
address=`ifconfig $HUB4_IPV6_INTERFACE | grep inet6 | grep Global | awk '/inet6/{print $3}' | grep -v 'fdd7' | cut -d '/' -f1 | head -n1`
address=`ifconfig $WANINTERFACE | grep inet6 | grep Global | awk '/inet6/{print $3}' | grep -v 'fdd7' | cut -d '/' -f1 | head -n1`
else
address=`ifconfig $WANINTERFACE | grep "inet addr" | grep -v inet6 | cut -f2 -d: | cut -f1 -d" "`
fi
Expand All @@ -140,18 +134,11 @@ getErouterIPAddress()
if [ ! "$address" ]; then
address=`dmcli eRT retv Device.DeviceInfo.X_COMCAST-COM_WAN_IP`
fi
elif [ "$BOX_TYPE" = "HUB4" ] || [ "$BOX_TYPE" = "SR300" ] || [ "x$BOX_TYPE" = "xSR213" ] || [ "$BOX_TYPE" = "SE501" ] || [ "$BOX_TYPE" = "WNXL11BWL" ] || [ "$UseLANIFIPV6" = "true" ]; then
CURRENT_WAN_IPV6_STATUS=`sysevent get ipv6_connection_state`
if [ "xup" = "x$CURRENT_WAN_IPV6_STATUS" ] ; then
address=`ifconfig $HUB4_IPV6_INTERFACE | grep inet6 | grep Global | awk '/inet6/{print $3}' | grep -v 'fdd7' | cut -d '/' -f1 | head -n1`
else
address=`ifconfig $WANINTERFACE | grep "inet addr" | grep -v inet6 | cut -f2 -d: | cut -f1 -d" "`
fi
elif [ $BOX_TYPE = "XF3" ]; then
# in PON/DSL you cant get the CM IP address, so use eRouter IP address
address=`ifconfig $WANINTERFACE | grep "inet addr" | grep -v inet6 | cut -f2 -d: | cut -f1 -d" "`
else
address=`ifconfig -a $WANINTERFACE | grep inet6 | tr -s " " | grep -v Link | cut -d " " -f4 | cut -d "/" -f1`
address=`ifconfig -a $WANINTERFACE | grep inet6 | grep Global | awk '/inet6/{print $3}' | grep -v 'fdd7' | cut -d '/' -f1 | head -n1`
if [ ! "$address" ]; then
address=`ifconfig -a $WANINTERFACE | grep inet | grep -v inet6 | tr -s " " | cut -d ":" -f2 | cut -d " " -f1`
fi
Expand Down
Loading