netstat truncates interface name. Please migrate to ifconfig or other tool

Bug #1668685 reported by Veron Rado on 2017-02-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gufw
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<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

Apparently netstat is depreciated on Linux.[1]
Could you please migrate to a better tool like ifconfig?
Thanks.

[1] https://en.wikipedia.org/wiki/Netstat
[2] https://answers.launchpad.net/gui-ufw/+question/469053

Veron Rado (junket) on 2017-02-28
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
costales (costales) on 2017-02-28
Changed in gui-ufw:
status: New → Triaged
assignee: nobody → costales (costales)
milestone: none → 17.10
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers