RDKEMW-17726, RDKEMW-17727: Fix the Migration of RDKV-to-RDKE#531
RDKEMW-17726, RDKEMW-17727: Fix the Migration of RDKV-to-RDKE#531
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the NetworkManager bootstrap/migration logic to correctly migrate Wi-Fi profiles when the SSID is stored as hex in wpa_supplicant.conf, and to select SAE vs WPA-PSK key management during RDKV → RDKE migration.
Changes:
- Reworked SSID extraction to handle both quoted SSIDs and hex-encoded SSIDs (with hex → string conversion).
- Added
key_mgmtparsing to choosesaevswpa-pskfor thenmcliconnection creation. - Improved shell quoting for
-zchecks and made thesedtarget configurable via$RDKV_SUPP_CONF.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RDKEMW-17800:gst-cleanup conditions when cdl_flashed_file_name is not…
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
lib/rdk/NM_Bootstrap.sh:81
- The SAE detection is too strict:
key_mgmtis often a space-separated list (e.g., transition mode likeSAE WPA-PSK), and this logic will incorrectly fall back towpa-pskunless the value is exactlySAEorSAE FT-SAE. Consider trimming whitespace / stripping inline comments and checking whether thekey_mgmtvalue contains theSAEtoken to ensure WPA3 migration works in mixed/transition configurations.
fi
echo "`/bin/timestamp`: key_mgmt is $KEY_MGMT" >> /opt/logs/NMMonitor.log
sed -i '/network={/,/}/d' "$RDKV_SUPP_CONF"
fi
if [ "$BOOT_TYPE" == "BOOT_MIGRATION" ]; then
if [ -f $MIGRATION_JSON ]; then
echo "`/bin/timestamp` :$0: BOOT_TYPE=$BOOT_TYPE... Waiting for IMMUI connect" >> /opt/logs/NMMonitor.log
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
lib/rdk/NM_Bootstrap.sh:50
PSK_LINE=$(grep psk= ...)can return multiple lines if the config has more than one network block (or multiplepsk=entries), which can cause the subsequent regex extraction to fail or select an unintended PSK. Consider usinggrep -m 1with an anchored pattern (e.g.,^[[:space:]]*psk=) or parsing within the samenetwork={...}block as the chosen SSID.
PSK_LINE=$(grep psk= "$RDKV_SUPP_CONF")
# Case 1: Quoted passphrase
if [[ "$PSK_LINE" =~ psk=\"(.+)\" ]]; then
PSK="${BASH_REMATCH[1]}"
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
lib/rdk/NM_Bootstrap.sh:50
PSK_LINE=$(grep psk= ...)can capture multiplepsk=lines (including from multiplenetwork={}blocks), and the subsequent regex match will then pick the first occurrence in that multi-line string. This can desynchronize SSID/PSK selection when multiple saved networks exist. Consider scoping extraction to the samenetwork={...}block as the chosen SSID (e.g., extract the first network block first, then parse ssid/psk/key_mgmt within it) or at least use an anchoredgrep -m1 '^[[:space:]]*psk='.
PSK_LINE=$(grep psk= "$RDKV_SUPP_CONF")
# Case 1: Quoted passphrase
if [[ "$PSK_LINE" =~ psk=\"(.+)\" ]]; then
PSK="${BASH_REMATCH[1]}"
Reason for change: Fix the SSID name in HEX format, support for SAE during migration
Test Procedure: Test with SSID name in HEX format, WPA3 personal mode as security mode
Risks: Medium
Signed-off-by: jincysaramma_sam@comcast.com