[Interest] QNetworkInterface working differently on Qt5?
Thiago Macieira
thiago.macieira at intel.com
Wed Dec 2 22:13:28 CET 2015
On Wednesday 02 December 2015 08:02:16 Thiago Macieira wrote:
> I did some changes for QNetworkInterface for Qt 5.2 that may have caused
> this problem. I will look into changing it so that the information is
> merged. The extra interface name will be lost (good riddance!).
Fixed in https://codereview.qt-project.org/142861.
It now reports:
Interface: "vlan0"
index: 14
flags: Up,Running,Broadcast,Multicast
type: QNetworkInterface::InterfaceType(Ethernet)
hw address: 5C:51:4F:7C:49:F8
address 0: 192.168.1.1/32 (255.255.255.255) broadcast 192.168.1.255
address 1: 192.168.1.2/32 (255.255.255.255) broadcast 192.168.1.255
address 2: fe80::5e51:4fff:fe7c:49f8%vlan0/64 (ffff:ffff:ffff:ffff::)
But note that your application still has a bug because you were assuming the
MAC address is unique among the interfaces on your machine. That is not
required: it's possible for the same MAC address to be used by multiple
interfaces. You should fix that.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list