Skip to content

RDKEMW-17726, RDKEMW-17727: Fix the Migration of RDKV-to-RDKE#531

Merged
nhanasi merged 12 commits intodevelopfrom
feature/RDKEMW-17727-1
May 7, 2026
Merged

RDKEMW-17726, RDKEMW-17727: Fix the Migration of RDKV-to-RDKE#531
nhanasi merged 12 commits intodevelopfrom
feature/RDKEMW-17727-1

Conversation

@jincysam87
Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings May 4, 2026 17:57
@jincysam87 jincysam87 requested a review from a team as a code owner May 4, 2026 17:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_mgmt parsing to choose sae vs wpa-psk for the nmcli connection creation.
  • Improved shell quoting for -z checks and made the sed target configurable via $RDKV_SUPP_CONF.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/rdk/NM_Bootstrap.sh
Comment thread lib/rdk/NM_Bootstrap.sh Outdated
Comment thread lib/rdk/NM_Bootstrap.sh Outdated
Copilot AI review requested due to automatic review settings May 4, 2026 18:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread lib/rdk/NM_Bootstrap.sh
Comment thread lib/rdk/NM_Bootstrap.sh Outdated
Comment thread lib/rdk/NM_Bootstrap.sh
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 4, 2026 19:05
@jincysam87 jincysam87 changed the title RDKEMW-0000: Fix the Migration of RDKV-to-RDKE RDKEMW-17726, RDKEMW-17727: Fix the Migration of RDKV-to-RDKE May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread lib/rdk/NM_Bootstrap.sh
Comment thread lib/rdk/NM_Bootstrap.sh
jincysam87 added 2 commits May 4, 2026 16:11
RDKEMW-17800:gst-cleanup conditions when cdl_flashed_file_name is not…
Copilot AI review requested due to automatic review settings May 5, 2026 15:16
nhanasi
nhanasi previously approved these changes May 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_mgmt is often a space-separated list (e.g., transition mode like SAE WPA-PSK), and this logic will incorrectly fall back to wpa-psk unless the value is exactly SAE or SAE FT-SAE. Consider trimming whitespace / stripping inline comments and checking whether the key_mgmt value contains the SAE token 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.

Comment thread lib/rdk/NM_Bootstrap.sh
Comment thread lib/rdk/NM_Bootstrap.sh
AravindanNC
AravindanNC previously approved these changes May 5, 2026
nhanasi
nhanasi previously approved these changes May 6, 2026
@jincysam87 jincysam87 dismissed stale reviews from nhanasi and AravindanNC via 82c0afd May 6, 2026 19:45
Copilot AI review requested due to automatic review settings May 7, 2026 00:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 multiple psk= entries), which can cause the subsequent regex extraction to fail or select an unintended PSK. Consider using grep -m 1 with an anchored pattern (e.g., ^[[:space:]]*psk=) or parsing within the same network={...} 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]}"

Comment thread lib/rdk/NM_Bootstrap.sh
Comment thread lib/rdk/NM_Bootstrap.sh
Copilot AI review requested due to automatic review settings May 7, 2026 15:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 multiple psk= lines (including from multiple network={} 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 same network={...} 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 anchored grep -m1 '^[[:space:]]*psk='.
  PSK_LINE=$(grep psk= "$RDKV_SUPP_CONF")

  # Case 1: Quoted passphrase
  if [[ "$PSK_LINE" =~ psk=\"(.+)\" ]]; then
    PSK="${BASH_REMATCH[1]}"

Comment thread lib/rdk/NM_Bootstrap.sh
Comment thread lib/rdk/NM_Bootstrap.sh
@nhanasi nhanasi merged commit 61155b6 into develop May 7, 2026
10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants