Bugfixes part 3 #209

Open
andrey wants to merge 37 commits from bugfixes3 into master
Showing only changes of commit 27ed1bc9a7 - Show all commits
+3 -1
View File
@@ -1207,7 +1207,9 @@ PIEthernet::InterfaceList PIEthernet::interfaces() {
if (ioctl(s, SIOCGIFHWADDR, &ir) == 0) ci.mac = macFromBytes(PIByteArray(ir.ifr_hwaddr.sa_data, 6));
if (ioctl(s, SIOCGIFADDR, &ir) >= 0) ci.address = getSockAddr(&ir.ifr_addr);
if (ioctl(s, SIOCGIFNETMASK, &ir) >= 0) ci.netmask = getSockAddr(&ir.ifr_netmask);
ioctl(s, SIOCGIFMTU, &ci.mtu);
if (ioctl(s, SIOCGIFMTU, &ir) == 0) {
ci.mtu = ir.ifr_mtu;
}
if (ci.address == "127.0.0.1") ci.flags |= PIEthernet::ifLoopback;
il << ci;
}