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

DietPi | Fix wrong shown connection state if IP+route is active but link "DOWN" #2586

Merged
merged 3 commits into from
Feb 24, 2019

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Feb 24, 2019

Status: Ready

  • DietPi-Obtain_network_details
  • Changelog

Reference: https://github.com/Fourdee/DietPi/issues/2573

Testing:

Old script:

root@VM-Stretch:~# time for i in {1..10}; do /DietPi/dietpi/func/obtain_network_details; done

real    0m1.645s
user    0m0.144s
sys     0m0.204s
root@VM-Stretch:~# time for i in {1..10}; do /DietPi/dietpi/func/obtain_network_details; done

real    0m1.632s
user    0m0.140s
sys     0m0.204s
root@VM-Stretch:~# time for i in {1..10}; do /DietPi/dietpi/func/obtain_network_details; done

real    0m1.611s
user    0m0.132s
sys     0m0.196s
root@VM-Stretch:~# time for i in {1..10}; do /DietPi/dietpi/func/obtain_network_details; done

real    0m1.611s
user    0m0.136s
sys     0m0.216s

New script:

root@VM-Stretch:~# time for i in {1..10}; do /DietPi/dietpi/func/obtain_network_details_new; done

real    0m0.641s
user    0m0.368s
sys     0m0.160s
root@VM-Stretch:~# time for i in {1..10}; do /DietPi/dietpi/func/obtain_network_details_new; done

real    0m0.651s
user    0m0.392s
sys     0m0.132s
root@VM-Stretch:~# time for i in {1..10}; do /DietPi/dietpi/func/obtain_network_details_new; done

real    0m0.648s
user    0m0.360s
sys     0m0.168s
root@VM-Stretch:~# time for i in {1..10}; do /DietPi/dietpi/func/obtain_network_details_new; done

real    0m0.646s
user    0m0.336s
sys     0m0.192s
root@VM-Stretch:~# cat /DietPi/dietpi/.network
0
0
eth0
192.168.178.29
ETH_IP=192.168.178.29
WLAN_IP=
  • 🈯️ 🚀 Performance increase > 100%

Commit list/description:

  • DietPi-Config | Fix wrong shown connection state where in some cases a route is shown but suffixed with "linkdown"
  • DietPi-Obtain_network_details | Rewrite: Scan more targeted via /sys/class/net entries: Performance!
  • DietPi-Obtain_network_details | Verify that device with assigned IP is actually connected, via "ip a" =~ "UP" flag

+ DietPi-Config | Fix wrong shown connection state where in some cases a route is shown but suffixed with "linkdown"
@MichaIng MichaIng added Bug 🐞 Visual 🌹 Issues affecting only the beauty of menus and output, but not the functionality labels Feb 24, 2019
@MichaIng MichaIng added this to the v6.22 milestone Feb 24, 2019
@MichaIng MichaIng self-assigned this Feb 24, 2019
+ DietPi-Obtain_network_details | Rewrite: Scan more targeted via /sys/class/net entries: Performance!
+ DietPi-Obtain_network_details | Verify that device with assigned IP is actually connected, via "ip a" =~ "UP" flag
+ CHANGELOG | Resolved an issue where DietPi-Config and banner shows wrong adapter state
@MichaIng MichaIng merged commit cbfc4e6 into dev Feb 24, 2019
@MichaIng MichaIng deleted the fix_check_connection_state branch February 24, 2019 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Visual 🌹 Issues affecting only the beauty of menus and output, but not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant