Skip to content
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

Fix wifi netplan gateway parser (Bugfix) #1536

Merged
merged 7 commits into from
Oct 14, 2024
Merged

Fix wifi netplan gateway parser (Bugfix) #1536

merged 7 commits into from
Oct 14, 2024

Conversation

seankingyang
Copy link
Contributor

Description

Correct the gateway parser.

In UC20, the systemd version is 245, and the formate is difference with the newer systemd version:

ubuntu@ubuntu:~$ networkctl --version
systemd 245 (245.4-4ubuntu3.23)

ubuntu@ubuntu:~$ networkctl status --no-pager --no-legend wlp1s0 
● 3: wlp1s0                                                              
             Link File: /usr/lib/systemd/network/99-default.link         
          Network File: /run/systemd/network/10-netplan-wlp1s0.network   
                  Type: wlan                                             
                 State: routable (configured)  
                  Path: pci-0000:01:00.0                                 
                Driver: iwlwifi                                          
                Vendor: Intel Corporation                                
                 Model: Wireless 8265 / 8275 (Dual Band Wireless-AC 8265)
            HW Address: b4:6b:fc:33:40:e6 (Intel Corporate)              
                   MTU: 1500 (min: 256, max: 2304)                       
     WiFi access point: cert-ac-open-tel-l3-01 (ae:84:c6:62:8d:12)       
  Queue Length (Tx/Rx): 1/1                                              
               Address: 192.168.153.146 (DHCP4)                          
                        fe80::b66b:fcff:fe33:40e6                        
               Gateway: 192.168.144.1 (TP-LINK TECHNOLOGIES CO.,LTD.)    
                   DNS: 192.168.144.1                                    
     Activation Policy: up                                               
   Required For Online: yes       

In UC22, the systemd version is 249:

ceqa@ubuntu:~$ networkctl --version
systemd 249 (249.11-0ubuntu3.12)

ceqa@ubuntu:~$ networkctl status --no-pager --no-legend wlp1s0 
● 3: wlp1s0                                                                    
                     Link File: /usr/lib/systemd/network/99-default.link
                  Network File: /run/systemd/network/10-netplan-wlp1s0.network
                          Type: wlan
                         State: routable (configured)
                  Online state: online                                         
                          Path: platform-112f0000.pcie-pci-0000:01:00.0
                        Driver: mt7921e
                        Vendor: MEDIATEK Corp.
                    HW Address: 2c:3b:70:3f:d2:f3
                           MTU: 1500 (min: 256, max: 2304)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
             WiFi access point: cert-ac-open-tel-l3-01 (ae:84:c6:62:8d:12)
          Queue Length (Tx/Rx): 1/1
                       Address: 192.168.156.224 (DHCP4 via 192.168.144.1)
                                fe80::2e3b:70ff:fe3f:d2f3
                       Gateway: 192.168.144.1
                           DNS: 192.168.144.1
             Activation Policy: up
           Required For Online: yes
               DHCP4 Client ID: IAID:0xff4d6f5/DUID
             DHCP6 Client DUID: DUID-EN/Vendor:0000ab11719fc417932a6a1c0000

Resolved issues

Incorrect ping parameter on wirless open ac connection test #1533

Documentation

Tests

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.73%. Comparing base (cd772da) to head (b691e52).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1536      +/-   ##
==========================================
+ Coverage   47.72%   47.73%   +0.01%     
==========================================
  Files         370      370              
  Lines       39739    39750      +11     
  Branches     6719     6720       +1     
==========================================
+ Hits        18965    18976      +11     
  Misses      20059    20059              
  Partials      715      715              
Flag Coverage Δ
provider-base 24.71% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

I would not create the additional function

providers/base/bin/wifi_client_test_netplan.py Outdated Show resolved Hide resolved
providers/base/bin/wifi_client_test_netplan.py Outdated Show resolved Hide resolved
@Hook25 Hook25 self-assigned this Oct 14, 2024
@Hook25 Hook25 added the waiting-for-changes The review has been completed but the PR is waiting for changes from the author label Oct 14, 2024
@seankingyang seankingyang removed the waiting-for-changes The review has been completed but the PR is waiting for changes from the author label Oct 14, 2024
@Hook25 Hook25 merged commit 7a8e121 into main Oct 14, 2024
43 checks passed
@Hook25 Hook25 deleted the Fix_wifi_netplan branch October 14, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants