-
Notifications
You must be signed in to change notification settings - Fork 6
Rebase feature/RDKEMW-8178 branch inline with develop #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/RDKEMW-8178
Are you sure you want to change the base?
Changes from all commits
7294595
7390ece
a0dc884
38206e1
6e2026e
f3f5062
5ee8ac5
7773fe7
2d38ec2
42b452a
88b4f51
a496e69
fa122a3
c23e38e
b5a3865
2395480
f48867d
3c97a58
2a82d90
bc31b95
288fc77
0c670c5
58ebf63
4d797df
3cad662
597e60a
a629329
8fc06fd
d77b8b6
82806f9
d1cb853
7b5a9b8
8a175d8
5af2812
5109310
f3e9d8f
f1ab3f5
5a00b13
73ff4a8
22db63f
e3c6a47
d35b0f6
95645ac
8dd5ab9
da072c3
1b77738
417596d
528ddce
2fafedf
515a568
79609a1
3dd2339
5b5950b
15cd4a1
bfff35f
3133a34
93ce925
5f91560
21529fb
6ba91e0
7c64ecf
02213a0
e597498
7ff46a5
e8e5d00
ed3a2c9
8ac42a4
f9f96b5
35adb09
c5764ba
44629c7
c37e9e9
43d79a7
d9704e2
67c57aa
f54d768
7eeb0e9
1f69450
e55763e
818133f
72776fc
5b56136
1df413f
937d21f
b86bfe3
880d752
1775157
38da422
fe25fa7
16d826b
7394e84
473d99f
661b82c
a8ca15d
2aa1f8e
59b4013
0b7a028
fbb7a3e
7b085a2
be909e8
1bebeb8
668eeca
7e605fd
fac7dfc
1be51ef
27f8e41
f8b2432
73181a5
e455a80
2a428f5
138be84
c9c32a2
07c7aab
84339f4
d1b176a
a232c32
488750c
8fcdc31
d52473a
4022281
76bf8f0
4a29ec2
354b182
999928c
2d7ca69
c21ba73
d0cbe87
db73c8d
ce34886
13e79f9
f085b1d
ebcf851
92173b4
7598c95
ded2a59
f9bec1c
aebdac3
2dc0d67
6596c78
8668de9
b94cde6
6a71c71
ad07789
5dd81f9
94f6e42
029809e
cfc061b
0af8bee
e34a943
9b8505a
06dc579
4f77233
7335293
57b3c12
4b963e5
3bd6471
dee962f
2c94e2e
9ea66e2
f554628
3d2215e
925c788
50d0537
ade8cc2
56c3713
adf5b1b
9307d25
d9f48c0
0f3db13
ced3966
5c9f548
631e4af
124d3bf
0f44776
654be5f
bc5e8d8
711601e
9facdd3
af56fe3
be07e4b
c31fdaf
f5f229b
4d4ef7e
cd2d601
5d44360
0edbcde
f13d901
35cff6f
d5bffcb
0286694
ddc1cea
61155b6
d138055
0e05ed7
c6bd2c5
1888519
6974aef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: "CLA" | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| actions: write | ||
| statuses: write | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_target: | ||
| types: [opened, closed, synchronize] | ||
|
|
||
| jobs: | ||
| CLA-Lite: | ||
| name: "Signature" | ||
| uses: rdkcentral/cmf-actions/.github/workflows/cla.yml@v1 | ||
| secrets: | ||
| PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_ASSISTANT }} |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| [keyfile] | ||
| unmanaged-devices=interface-name:ap*;interface-name:dobby*;interface-name:lo;interface-name:p2p*;interface-name:veth*;interface-name:ip*;interface-name:wlan1 | ||
| unmanaged-devices=interface-name:ap*;interface-name:dobby*;interface-name:lo;interface-name:p2p*;interface-name:veth*;interface-name:ip*;interface-name:wlan1;interface-name:wl0.2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| interface=dobby0 |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||||||||
| #!/bin/sh | ||||||||||||||
| #!/bin/bash | ||||||||||||||
|
|
||||||||||||||
| ############################################################################## | ||||||||||||||
| # If not stated otherwise in this file or this component's LICENSE file the | ||||||||||||||
|
|
@@ -19,11 +19,31 @@ | |||||||||||||
| # limitations under the License. | ||||||||||||||
| ############################################################################## | ||||||||||||||
|
|
||||||||||||||
| WIFI_WPA_SUPPLICANT_CONF="/opt/secure/wifi/wpa_supplicant.conf" | ||||||||||||||
| BOOT_TYPE=$(grep "BOOT_TYPE" /tmp/bootType | cut -d '=' -f 2) | ||||||||||||||
|
||||||||||||||
| BOOT_TYPE=$(grep "BOOT_TYPE" /tmp/bootType | cut -d '=' -f 2) | |
| if [ -f /tmp/bootType ]; then | |
| BOOT_TYPE=$(grep "BOOT_TYPE" /tmp/bootType | cut -d '=' -f 2) | |
| else | |
| BOOT_TYPE="" | |
| fi |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comparison operators "==" used on lines 46 and 82 are bash-specific. Since the shebang is #!/bin/sh, use the POSIX-compliant "=" operator instead. Change to: if [ "$BOOT_TYPE" = "BOOT_MIGRATION" ]; then
| if [ "$BOOT_TYPE" == "BOOT_MIGRATION" ]; then | |
| if [ "$BOOT_TYPE" = "BOOT_MIGRATION" ]; then |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cp command will fail if /opt/NetworkManager/system-connections/ is empty (no files to copy). Consider adding a check or using a glob pattern like: if [ -n "$(ls -A /opt/NetworkManager/system-connections/ 2>/dev/null)" ]; then cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/; fi
| cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/ | |
| rm -rf /opt/NetworkManager/system-connections/* | |
| if [ -n "$(ls -A /opt/NetworkManager/system-connections 2>/dev/null)" ]; then | |
| cp /opt/NetworkManager/system-connections/* /opt/secure/NetworkManager/system-connections/ | |
| rm -rf /opt/NetworkManager/system-connections/* | |
| fi |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -40,6 +40,67 @@ NMdispatcherLog() | |||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||
| echo "$(/bin/timestamp) : $0: $*" >> $NM_LOG_FILE | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| # Refactored from updateGlobalIPInfo.sh | ||||||||||||||||||||||||||||||||||||||||||
| refresh_devicedetails() | ||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||
| #Refresh device cache info | ||||||||||||||||||||||||||||||||||||||||||
| if [ -f /lib/rdk/getDeviceDetails.sh ]; then | ||||||||||||||||||||||||||||||||||||||||||
| sh /lib/rdk/getDeviceDetails.sh refresh $1 | ||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||
| NMdispatcherLog "DeviceDetails file not present" | ||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| check_valid_IPaddress() | ||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||
| local mode=$1 | ||||||||||||||||||||||||||||||||||||||||||
| local addr=$2 | ||||||||||||||||||||||||||||||||||||||||||
| # Neglect IPV6 ULA address and autoconfigured IPV4 address | ||||||||||||||||||||||||||||||||||||||||||
| 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 | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+60
to
+67
|
||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+60
to
+68
|
||||||||||||||||||||||||||||||||||||||||||
| 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 | |
| if [ "x$mode" = "xipv6" ]; then | |
| case "$addr" in | |
| fc*|fd*) | |
| return 1 | |
| ;; | |
| esac | |
| elif [ "x$mode" = "xipv4" ]; then | |
| autoIPTrunc=$(echo "$addr" | cut -d "." -f1-2) | |
| if [ "$autoIPTrunc" = "169.254" ]; then | |
| return 1 | |
| fi |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable comparisons use incorrect syntax. The double equals '==' should be replaced with single equals '=' for POSIX shell compliance. This pattern appears in multiple places in this function (lines 60, 66, 83) and should be consistently using single equals for POSIX compatibility.
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable comparisons use incorrect syntax. The double equals '==' should be replaced with single equals '=' for POSIX shell compliance. This is inconsistent with line 60 which correctly uses '==' for pattern matching within double brackets, but line 83 uses it for a simple string comparison where '=' is more appropriate.
Copilot
AI
Feb 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional instances of '==' operator that should be '=' for POSIX sh compliance. The script uses '#!/bin/sh' but relies on bash-specific operators.
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comparison operators use '==' which is bash-specific. For POSIX shell compatibility (indicated by the #!/bin/sh shebang), use '=' for string comparisons.
Copilot
AI
Apr 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If $ETHERNET_INTERFACE or $WIFI_INTERFACE is empty/unset, the loop can iterate with an empty $iface. In that case /sys/class/net/ exists and the script may attempt to read /sys/class/net//carrier and to start/kill avahi-autoipd with an empty interface. Add a guard like [ -n \"$iface\" ] || continue before using $iface.
Copilot
AI
Feb 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'pgrep -f' pattern 'avahi-autoipd.*$iface' may match unintended processes if the interface name is generic (e.g., 'eth0' could match 'eth01'). Consider using a more specific pattern or using 'pgrep -x' with the exact process name, or checking the command line arguments more carefully to ensure you're only matching the exact interface.
| if pgrep -f "avahi-autoipd.*$iface" > /dev/null 2>&1; then | |
| if pgrep -f "avahi-autoipd .* $iface\$" > /dev/null 2>&1; then |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The avahi-autoipd is being started without checking if the interface has a valid IP address first. When an interface gets a DHCP address (connectivity-change), starting avahi-autoipd could conflict with the DHCP-assigned address. The logic should verify that there's no DHCP address before starting link-local addressing. Also note that line 202 properly kills avahi-autoipd on dhcp4-change, but the connectivity-change handler at line 187 may start it prematurely.
| NMdispatcherLog "Started avahi-autoipd for $iface" | |
| /usr/sbin/avahi-autoipd --daemonize --syslog "$iface" | |
| # Before starting avahi-autoipd, ensure there is no global IPv4 address | |
| IPV4_ADDR=$(ip -4 addr show dev "$iface" scope global 2>/dev/null | awk '/inet / {print $2}' | head -n 1) | |
| if [ -n "$IPV4_ADDR" ]; then | |
| NMdispatcherLog "$iface already has IPv4 address $IPV4_ADDR - not starting avahi-autoipd" | |
| else | |
| NMdispatcherLog "Started avahi-autoipd for $iface" | |
| /usr/sbin/avahi-autoipd --daemonize --syslog "$iface" | |
| fi |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation detected. Line 202 uses spaces for indentation while line 58 and 59 use a tab character. The codebase should maintain consistent indentation style throughout the file.
| /usr/sbin/avahi-autoipd --kill "$interfaceName" 2>/dev/null | |
| /usr/sbin/avahi-autoipd --kill "$interfaceName" 2>/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow version has been changed from a branch reference '@develop' to a specific version '@1.0.0'. This is a good practice for stability, but ensure that version 1.0.0 of the referenced workflow exists and contains all necessary functionality. Using a specific version tag is more reliable than a branch reference.