}
static int nw_port_setup_address(nw_port* port) {
+ char* __address = NULL;
int r;
// Read ADDRESS from configuration
return r;
}
+ // Format the generated address
+ __address = nw_address_to_string(&port->address);
+ if (__address) {
+ ERROR("Generated a random Ethernet address for %s: %s\n", port->name, __address);
+
+ // Free the address
+ free(__address);
+ }
+
return 0;
}
// XXX Set common things like MTU, etc.
- // Set MAC address
+ // Set Ethernet address
r = sd_netlink_message_append_ether_addr(m, IFLA_ADDRESS, &port->address);
if (r < 0) {
ERROR("Could not set MAC address: %s\n", strerror(-r));