LTE-2904: Set ipv4_br-home_ipaddr sysevent#333
Open
rajkamal-cv wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the sshd (dropbear) startup logic for the WNXL11BWL platform to better handle delayed IPv4 assignment (notably in Extender mode) and to react to the ipv4_br-home_ipaddr sysevent.
Changes:
- Add a helper to wait (up to 300s) for an IPv4 address on a given interface before adding it as a dropbear listen address.
- Update
WNXL11BWLdropbear listen address construction (wwan0 v4/v6 + optional non-wwan interface v4) and add handlers foripv4_br-home_ipaddr(restart in Extender mode) andmesh_wan_linkstatus. - Register the
ipv4_br-home_ipaddrsysevent with thesshdservice manager for_WNXL11BWL_PRODUCT_REQ_.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| source/scripts/init/service.d/service_sshd.sh | Adds interface-IP wait helper, extends WNXL11BWL listen/restart behavior, and adds new event cases. |
| source/scripts/init/c_registration/15_ssh_server.c | Registers ipv4_br-home_ipaddr as a custom event for the sshd service on WNXL11BWL builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+233
to
+234
| BRHOME_IP=`sysevent get ipv4_br-home_ipaddr` | ||
| echo_t "BRHOME_IP = $BRHOME_IP" |
Comment on lines
+492
to
+495
| echo_t "commented out intentionall" | ||
| #service_stop | ||
| #service_start | ||
| fi |
|
|
||
| *) | ||
| echo "Usage: $SELF_NAME [${SERVICE_NAME}-start|${SERVICE_NAME}-stop|${SERVICE_NAME}-restart|ssh_server_restart|lan-status|wan-status]" >&2 | ||
| echo "Usage: $SELF_NAME [${SERVICE_NAME}-start|${SERVICE_NAME}-stop|${SERVICE_NAME}-restart|wan-status|bridge-status|current_wan_ifname|mesh_wan_linkstatus <status>]" >&2 |
|
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. |
Comment on lines
+137
to
+141
| # wait_for_iface_ip <interface> | ||
| # Blocks up to 300 seconds (150 x 2s) waiting for an IPv4 address on the | ||
| # given interface. Prints the IP to stdout on success; logs an error and | ||
| # returns 1 on timeout. | ||
| wait_for_iface_ip() { |
Comment on lines
+478
to
+483
| mesh_wan_linkstatus) | ||
| if [ "$BOX_TYPE" = "WNXL11BWL" ] && [ "$2" = "up" ]; then | ||
| DEVICE_MODE=`deviceinfo.sh -mode` | ||
| if [ "$DEVICE_MODE" = "Extender" ]; then | ||
| echo_t "commented out intentionall" | ||
| #service_stop |
| if [ "$BOX_TYPE" = "WNXL11BWL" ] && [ "$2" = "up" ]; then | ||
| DEVICE_MODE=`deviceinfo.sh -mode` | ||
| if [ "$DEVICE_MODE" = "Extender" ]; then | ||
| echo_t "commented out intentionall" |
Comment on lines
+232
to
+234
| if [ "$CMINTERFACE" = "br-home" ]; then | ||
| CM_IP=`sysevent get ipv4_br-home_dhcp_ipaddr` | ||
| echo_t "[utopia] ipv4_br-home_dhcp_ipaddr = $CM_IP" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.