From 90fc7377fd6307f66751c2b6c3f19c87d9627ecd Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 20 Mar 2014 19:42:59 -0700 Subject: [PATCH] client: tweak in MAC address code for struct lifconf --- client/mac_address.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/mac_address.cpp b/client/mac_address.cpp index 87f6c3e44f..7b5a8b6f7a 100644 --- a/client/mac_address.cpp +++ b/client/mac_address.cpp @@ -264,7 +264,11 @@ int get_mac_address(char* address) { hw_addr = (struct ether_addr *)&(item->lifr_lifru.lifru_enaddr); #endif strcpy(address, ether_ntoa(hw_addr)); +#ifdef HAVE_STRUCT_LIFCONF + if (strstr(item->lifr_name, "eth")) break; +#else if (strstr(item->ifr_name, "eth")) break; +#endif } close(sck); if (!strcmp(address, "")) return -1;