X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=discover%2Fnetwork.c;h=7ddecc03b658a59e88e00bfcf9156114ca7f13c6;hb=4153ab54b5933fc315ad896e264f74571a494c90;hp=bc7e186a1921e8531bb2fd37ed026f5e47e5977e;hpb=d67d5beceef94686818ce264b2ca93f82b66e8f4;p=petitboot diff --git a/discover/network.c b/discover/network.c index bc7e186..7ddecc0 100644 --- a/discover/network.c +++ b/discover/network.c @@ -416,14 +416,15 @@ static int network_handle_nlmsg(struct network *network, struct nlmsghdr *nlmsg) memcpy(interface->hwaddr, ifaddr, sizeof(interface->hwaddr)); strncpy(interface->name, ifname, sizeof(interface->name) - 1); add_interface(network, interface); - - /* tell the sysinfo code about this interface */ - if (strcmp(interface->name, "lo")) - system_info_register_interface( - sizeof(interface->hwaddr), - interface->hwaddr, interface->name); } + /* notify the sysinfo code about changes to this interface */ + if (strcmp(interface->name, "lo")) + system_info_register_interface( + sizeof(interface->hwaddr), + interface->hwaddr, interface->name, + info->ifi_flags & IFF_LOWER_UP); + configure_interface(network, interface, info->ifi_flags & IFF_UP, info->ifi_flags & IFF_LOWER_UP);