netstat truncates interface name. Please migrate to ifconfig or other tool
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gufw |
Fix Released
|
Undecided
|
costales |
Bug Description
Hi
Ruinng Ubuntu 16.10.
My Ethernet device's correct ID is enp0s31f4.
Using the "Add a Firewall Rule" under "Advanced" and then "Interfaces" Gufw identifies it as enp0s31f (It drops the last digit.)
I only twigged it when I was troubleshooting an Ethernet rule that wouldn't work. When set to "All Interfaces" it worked fine.
All other tools I've use identify the interface correctly (ifconfig, ifstat etc.)
From a question I asked on Answers I learned Gufw uses netstat to get the interface name.[2]
Checking netstat I can confirm it is the cause of the error.
$ netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
enp0s31f 1500 41477 0 0 0 18446 0 0 0 BMRU
$ ifconfig -a
enp0s31f4: flags=4163<
Apparently netstat is depreciated on Linux.[1]
Could you please migrate to a better tool like ifconfig?
Thanks.
[1] https:/
[2] https:/
Related branches
- costales: Pending requested
-
Diff: 36 lines (+4/-6)2 files modifiedgufw/gufw/model/ufw_backend.py (+3/-5)
po/gufw.pot (+1/-1)
summary: |
- netstat trucates interface name. Please migrate to ifconfig or other + netstat truncates interface name. Please migrate to ifconfig or other tool |
description: | updated |
description: | updated |
Changed in gui-ufw: | |
status: | New → Triaged |
assignee: | nobody → costales (costales) |
milestone: | none → 17.10 |
Changed in gui-ufw: | |
status: | In Progress → Fix Committed |
Changed in gui-ufw: | |
status: | Fix Committed → Fix Released |
Hi Veron,
Could you do me a test please?
Are OK these interfaces for your system?
costales@desktop:~$ ls /sys/class/net
enp0s22 lo wlp3s1
costales@desktop:~$
Thanks in advance!