- for (i = 0; i < config->network.n_interfaces; i++) {
- struct interface_config *ifconf =
- config->network.interfaces[i];
-
- pb_log(" interface %02x:%02x:%02x:%02x:%02x:%02x\n",
- ifconf->hwaddr[0], ifconf->hwaddr[1],
- ifconf->hwaddr[2], ifconf->hwaddr[3],
- ifconf->hwaddr[4], ifconf->hwaddr[5]);
-
- if (ifconf->ignore) {
- pb_log(" ignore\n");
- continue;
- }
-
- if (ifconf->method == CONFIG_METHOD_DHCP) {
- pb_log(" dhcp\n");
-
- } else if (ifconf->method == CONFIG_METHOD_STATIC) {
- pb_log(" static:\n");
- pb_log(" ip: %s\n", ifconf->static_config.address);
- pb_log(" gw: %s\n", ifconf->static_config.gateway);
-
- }
+ switch (src->method) {
+ case CONFIG_METHOD_DHCP:
+ break;
+ case CONFIG_METHOD_STATIC:
+ dest->static_config.address =
+ talloc_strdup(dest, src->static_config.address);
+ dest->static_config.gateway =
+ talloc_strdup(dest, src->static_config.gateway);
+ break;