Subject: | get_mac does not close socket when called |
Attached is a one liner patch for get_mac_linux.c to allow it to be called from a loop and not exhaust the number of file descriptors that can be open. Issue arrises from not calling close(sock); on line 71.
Subject: | get_mac_linux.patch |
--- get_mac_linux.c 2009-05-24 11:38:59.000000000 -0400
+++ get_mac_linux.c.f 2013-06-17 23:02:00.114316443 -0400
@@ -68,6 +68,7 @@
iface.ifr_hwaddr.sa_data[4] & 0xff,
iface.ifr_hwaddr.sa_data[5] & 0xff);
}
+ close(sock);
}
return 0;