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
1 change: 1 addition & 0 deletions source/scripts/init/service.d/service_routed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ case "$1" in
status=$(sysevent get lan-status)
if [ "$status" == "started" ]; then
service_routed start
service_routed radv-start
Copy link
Contributor

Choose a reason for hiding this comment

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

call this only on XLE device. zebra-restart is triggered from dhcpv6 sequence in XB /Other Gateway devices

elif [ "$status" == "stopped" ]; then
# As per Sky requirement, radvd should run with ULA prefix though the wan-status is down
if [ "$BOX_TYPE" != "HUB4" ] && [ "$BOX_TYPE" != "SR300" ] && [ "$BOX_TYPE" != "SE501" ] && [ "$BOX_TYPE" != "SR213" ] && [ "$BOX_TYPE" != "WNXL11BWL" ] && [ "$LANULASupport" != "true" ]; then
Expand Down
2 changes: 1 addition & 1 deletion source/service_deviceMode/service_devicemode.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ int service_start(int mode)
sysevent_set(sysevent_fd, sysevent_token, "lnf-setup", buf, 0);
#endif
runCommandInShellBlocking("systemctl restart CcspLMLite.service");
sysevent_set(sysevent_fd, sysevent_token, "zebra-restart", "", 0);
// sysevent_set(sysevent_fd, sysevent_token, "zebra-restart", "", 0);
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The zebra-restart sysevent has been commented out without any replacement logic or explanation in the code. This appears to be intentional based on the PR description about checking LAN status, but there's no corresponding logic that ensures zebra is restarted appropriately when LAN becomes ready. Consider either uncommenting this with proper LAN status checks, or adding clear documentation about why it was removed and how zebra restart is now triggered.

Suggested change
// sysevent_set(sysevent_fd, sysevent_token, "zebra-restart", "", 0);
/*
* Note:
* The zebra-restart sysevent used to be triggered unconditionally here
* when entering ROUTER mode. As part of changes to the LAN bring-up
* sequence, zebra lifecycle (start/restart) is now managed by the
* LAN/WAN management components once LAN is fully up.
*
* To avoid duplicate restarts and race conditions with those
* components, devicemode no longer restarts zebra directly.
* If zebra restart behavior needs to be modified, it should be done
* in the component responsible for routing daemon management rather
* than by re-enabling this call.
*/
// sysevent_set(sysevent_fd, sysevent_token, "zebra-restart", "", 0);

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The lanStartVal variable is retrieved but never used. If this was intended to be a condition check before restarting zebra (as suggested by the PR description about checking LAN status), the logic is incomplete. Either remove the unused variable or implement the intended LAN status check.

Suggested change
// sysevent_set(sysevent_fd, sysevent_token, "zebra-restart", "", 0);
if (strcmp(lanStartVal, "started") == 0)
{
APPLY_PRINT("%s: LAN is started, restarting zebra\n", __FUNCTION__);
sysevent_set(sysevent_fd, sysevent_token, "zebra-restart", "", 0);
}
else
{
APPLY_PRINT("%s: LAN is not started (status: %s), skipping zebra restart\n", __FUNCTION__, lanStartVal);
}

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

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

Commented-out code should be removed rather than left in the codebase. If this code needs to be removed as part of the fix, delete the line entirely. If you want to preserve the history, rely on version control (git) to track what was changed.

Suggested change
// sysevent_set(sysevent_fd, sysevent_token, "zebra-restart", "", 0);

Copilot uses AI. Check for mistakes.
}
break;
case DEVICE_MODE_EXTENDER:
Expand Down
Loading