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
69 changes: 34 additions & 35 deletions source/firewall/firewall.c

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions source/firewall/firewall_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -2279,9 +2279,9 @@ void do_ipv6_nat_table(FILE* fp)
fprintf(fp, ":%s - [0:0]\n", "prerouting_redirect");

#ifdef WAN_FAILOVER_SUPPORTED
#if !defined(_PLATFORM_RASPBERRYPI_) && !defined(_PLATFORM_BANANAPI_R4_)
#if !defined(_PLATFORM_RASPBERRYPI_) && !defined(_PLATFORM_BANANAPI_R4_) && !defined(_PLATFORM_GENERICARM_)
redirect_dns_to_extender(fp,AF_INET6);
#endif //_PLATFORM_RASPBERRYPI_ && _PLATFORM_BANANAPI_R4_
#endif // none of (_PLATFORM_RASPBERRYPI_, _PLATFORM_BANANAPI_R4_, _PLATFORM_GENERICARM_)
#endif

#if defined(_WNXL11BWL_PRODUCT_REQ_)
Expand Down
12 changes: 6 additions & 6 deletions source/scripts/init/service.d/lan_handler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ case "$1" in
echo_t "THE INSTANT=$INST"
echo_t "THE INSTANT=$INST"
#(use a simpler test than this -- but Hacky, since it assumes everything we want is not XB3!!)if [ "$BOX_TYPE" = "TCCBR" ] || [ "$BOX_TYPE" = "XB6" -a "$MANUFACTURE" = "Technicolor" ] || [ "$BOX_TYPE" = "XB7" -a "$MANUFACTURE" = "Technicolor" ] ; then
if ( [ "$BOX_TYPE" != "XB3" ] && ( [ "$MANUFACTURE" = "Technicolor" ] || [ "$MANUFACTURE" = "Sercomm" ] ) ) || [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]; then
if ( [ "$BOX_TYPE" != "XB3" ] && ( [ "$MANUFACTURE" = "Technicolor" ] || [ "$MANUFACTURE" = "Sercomm" ] ) ) || [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "genericarm" ]; then
COUNTER=1
while [ $COUNTER -lt 10 ]; do
echo_t "RDKB_SYSTEM_BOOT_UP_LOG : INST returned null , retrying $COUNTER"
Expand Down Expand Up @@ -436,15 +436,15 @@ case "$1" in

sysevent set primary_lan_l3net ${INST}
#BRLAN0 ISSUE : Manually invoking lan-start to fix brlan0 failure during intial booting. Root cause for event has to be identified
if [ "$RPI_SPECIFIC" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]; then
if [ "$RPI_SPECIFIC" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "genericarm" ]; then
sleep 2
L3NET=`sysevent get primary_lan_l3net`
if [ -z "$L3NET" ]; then
L3NET=4
sysevent set primary_lan_l3net $L3NET
fi
fi
fi
fi # end BRLAN0 ISSUE workaround
if [ -z "$INST" ] && [ "$BOX_TYPE" = "TCCBR" ]; then
echo_t "INST is empty on TCCBR; defaulting primary_lan_l3net to 4"
sysevent set primary_lan_l3net 4
Expand All @@ -460,7 +460,7 @@ case "$1" in

# Laninit complete happens as part of the service_dhcp_server.sh itself.Firewall restart happens as part of service_ip4 itself.In the above code we #are setting many sysevents related to LAN hence adding the lan_init complete logs here.Also as oer the logs , we moving to bring the eth interface after this.Hence lan in
# compelte can brought in here.
if [ "$RPI_SPECIFIC" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]; then
if [ "$RPI_SPECIFIC" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "genericarm" ]; then
if [ -e "/usr/bin/print_uptime" ]; then
/usr/bin/print_uptime "Laninit_complete"
fi
Expand Down Expand Up @@ -544,11 +544,11 @@ case "$1" in
;;

lan-start)
if [ "$RPI_SPECIFIC" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "HUB4" ] || [ "$BOX_TYPE" = "SR213" ] || [ "$BOX_TYPE" = "SCER11BEL" ] || [ "$BOX_TYPE" = "SCXF11BFL" ] || [ "$BOX_TYPE" = "XER2" ]; then
if [ "$RPI_SPECIFIC" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "genericarm" ] || [ "$BOX_TYPE" = "HUB4" ] || [ "$BOX_TYPE" = "SR213" ] || [ "$BOX_TYPE" = "SCER11BEL" ] || [ "$BOX_TYPE" = "SCXF11BFL" ] || [ "$BOX_TYPE" = "XER2" ]; then
L3Net=`sysevent get primary_lan_l3net`
if [ -z "$L3Net" ]; then
echo_t "RDKB_SYSTEM_BOOT_UP_LOG : L3Net is null"
if [ "$RPI_SPECIFIC" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]; then
if [ "$RPI_SPECIFIC" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "genericarm" ]; then
L3Net=4
sysevent set primary_lan_l3net $L3Net
else
Expand Down
8 changes: 4 additions & 4 deletions source/scripts/init/service.d/service_dhcp_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ dhcp_server_start ()
return 1
fi

if [ "$BOX_TYPE" != "rpi" ] && [ "$BOX_TYPE" != "bpi" ] && [ "$BOX_TYPE" != "turris" ]; then
if [ "$BOX_TYPE" != "rpi" ] && [ "$BOX_TYPE" != "bpi" ] && [ "$BOX_TYPE" != "turris" ] && [ "$BOX_TYPE" != "genericarm" ]; then
DHCP_STATE=`sysevent get lan_status-dhcp`
#if [ "started" != "$CURRENT_LAN_STATE" ] ; then
if [ "started" != "$DHCP_STATE" ] ; then
Expand Down Expand Up @@ -591,7 +591,7 @@ dhcp_server_start ()
if [ $? -eq 0 ]; then
echo_t "$SERVER process started successfully"
else
if [ "$BOX_TYPE" = "XB6" ] || [ "$BOX_TYPE" = "PUMA7_CGP" ] || [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "turris" ] ; then
if [ "$BOX_TYPE" = "XB6" ] || [ "$BOX_TYPE" = "PUMA7_CGP" ] || [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "turris" ] || [ "$BOX_TYPE" = "genericarm" ] ; then

COUNTER=0
while [ $COUNTER -lt 5 ]; do
Expand Down Expand Up @@ -622,7 +622,7 @@ dhcp_server_start ()
if [ "$PSM_MODE" != "1" ]; then
if [ -f "/var/tmp/.refreshlan" ];then
echo_t "RDKB_SYSTEM_BOOT_UP_LOG : Call gw_lan_refresh_from_dhcpscript:`uptime | cut -d "," -f1 | tr -d " \t\n\r"`"
if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]; then
if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "turris" ] || [ "$BOX_TYPE" = "genericarm" ]; then
Comment thread
mcbridematt marked this conversation as resolved.
reset_eth_usb_ports
else
gw_lan_refresh &
Expand All @@ -631,7 +631,7 @@ dhcp_server_start ()
elif [ ! -f "/var/tmp/lan_not_restart" ] && [ "$1" != "lan_not_restart" ]; then
if [ x"ready" = x`sysevent get start-misc` ]; then
echo_t "RDKB_SYSTEM_BOOT_UP_LOG : Call gw_lan_refresh_from_dhcpscript:`uptime | cut -d "," -f1 | tr -d " \t\n\r"`"
if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]; then
if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "turris" ] || [ "$BOX_TYPE" = "genericarm" ]; then
reset_eth_usb_ports
else
gw_lan_refresh &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ fi
fi
fi

if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "turris" ]; then
if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "turris" ] || [ "$BOX_TYPE" = "genericarm" ]; then
LAN_STATUS=`sysevent get lan-status`
BRIDGE_MODE=`syscfg get bridge_mode`
if [ "$LAN_STATUS" = "stopped" ] && [ $BRIDGE_MODE == 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion source/scripts/init/service.d/service_ipv4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ handle_l2_status () {
fi
fi
fi
if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]; then
if [ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "turris" ] || [ "$BOX_TYPE" = "genericarm" ]; then
LAN_STATUS=`sysevent get lan-status`
if [ "$LAN_STATUS" = "stopped" ]; then
echo_t "service_ipv4 : Starting lan-status"
Expand Down
2 changes: 1 addition & 1 deletion source/scripts/init/service.d/service_sshd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ do_start() {
fi
else
CM_IP=""
if ([ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ]) ;then
if ([ "$BOX_TYPE" = "rpi" ] || [ "$BOX_TYPE" = "bpi" ] || [ "$BOX_TYPE" = "genericarm" ]) ;then
#for Raspberry-pi, use the ipv4 address as default for ssh
CM_IP=`ip -4 addr show dev $CMINTERFACE scope global | awk '/inet/{print $2}' | cut -d '/' -f1`
else
Expand Down
4 changes: 2 additions & 2 deletions source/scripts/init/system/utopia_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ else
fi
fi

if [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "DPC3941B" ]; then
if [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "DPC3941B" ] || [ "${BOX_TYPE}" = "genericarm" ]; then
if [ -f /nvram/restore_reboot ];then
syscfg set X_RDKCENTRAL-COM_LastRebootReason "restore-reboot"
syscfg set X_RDKCENTRAL-COM_LastRebootCounter "1"
Expand Down Expand Up @@ -859,7 +859,7 @@ syscfg set ntp_status 2
echo_t "[utopia][init] setting Multicast MAC before any switch configs"
$UTOPIA_PATH/service_multinet_exec set_multicast_mac &

if [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "DPC3941B" ]; then
if [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "DPC3941B" ] || [ "${BOX_TYPE}" = "genericarm" ]; then
echo_t "[utopia][init] started dropbear process"
/etc/utopia/service.d/service_sshd.sh sshd-start &
Comment thread
mcbridematt marked this conversation as resolved.
fi
Expand Down
6 changes: 3 additions & 3 deletions source/service_wan/service_wan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ STATIC int wan_iface_up(struct serv_wan *sw)
STATIC int wan_iface_down(struct serv_wan *sw)
{
int err = 0;
#if !defined(_PLATFORM_RASPBERRYPI_) && !defined(_PLATFORM_BANANAPI_R4_)
#if !defined(_PLATFORM_RASPBERRYPI_) && !defined(_PLATFORM_BANANAPI_R4_) && !defined(_PLATFORM_GENERICARM_)
err = v_secure_system("ip -4 link set %s down", sw->ifname);
#endif
Comment thread
mcbridematt marked this conversation as resolved.
#if PUMA6_OR_NEWER_SOC_TYPE
Expand Down Expand Up @@ -1726,7 +1726,7 @@ STATIC int wan_addr_set(struct serv_wan *sw)
}
/* Should not be executed before wan_service-status is set to started for _PLATFORM_IPQ_ */

#if !defined(_PLATFORM_IPQ_) && !defined(_PLATFORM_RASPBERRYPI_) && !defined(_PLATFORM_TURRIS_)
#if !defined(_PLATFORM_IPQ_) && !defined(_PLATFORM_RASPBERRYPI_) && !defined(_PLATFORM_TURRIS_) && !defined(_PLATFORM_GENERICARM_)
#if defined (_XB6_PRODUCT_REQ_) && defined (_COSA_BCM_ARM_)
v_secure_system("firewall");
#else
Expand All @@ -1742,7 +1742,7 @@ STATIC int wan_addr_set(struct serv_wan *sw)
if(strcmp(mischandler_ready,"true") == 0)
{
//only for first time
#if !defined(_PLATFORM_RASPBERRYPI_) && !defined(_PLATFORM_TURRIS_) && !defined(_PLATFORM_BANANAPI_R4_)
#if !defined(_PLATFORM_RASPBERRYPI_) && !defined(_PLATFORM_TURRIS_) && !defined(_PLATFORM_BANANAPI_R4_) && !defined(_PLATFORM_GENERICARM_)
fprintf(stderr, "[%s] ready is set from misc handler. Doing gw_lan_refresh\n", PROG_NAME);
#if defined (_XB6_PRODUCT_REQ_) && defined (_COSA_BCM_ARM_)
v_secure_system("firewall");
Expand Down
Loading