@@ -684,7 +684,7 @@ void network_mark_interface_ready(struct device_handler *handler,
interface = talloc_zero(network, struct interface);
interface->ifindex = ifindex;
interface->state = IFSTATE_NEW;
- memcpy(interface->hwaddr, mac, HWADDR_SIZE);
+ memcpy(interface->hwaddr, mac, hwsize);
strncpy(interface->name, ifname, sizeof(interface->name) - 1);
list_for_each_entry(&network->interfaces, tmp, list)
@@ -713,7 +713,7 @@ void network_mark_interface_ready(struct device_handler *handler,
talloc_strdup(interface->dev->device, ifname);
}
- if (memcmp(interface->hwaddr, mac, HWADDR_SIZE) != 0) {
+ if (memcmp(interface->hwaddr, mac, hwsize) != 0) {
macstr = mac_bytes_to_string(interface, mac, hwsize);
pb_log("Warning - new MAC for interface %d does not match: %s\n",
ifindex, macstr);
This is mainly housekeeping in the interest of future flexibility. For now, hwsize is still required to be HWADDR_SIZE. Signed-off-by: Daniel M. Weeks <weeksd2@rpi.edu> --- discover/network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)