]> git.ozlabs.org Git - petitboot/blobdiff - discover/network.c
discover: Use pxeconffile for udhcpc option name
[petitboot] / discover / network.c
index b9b0c5043f58e3131b0789f1948257051d0f5831..6a1575f132ee306a1ba67db728226aa75bbd971c 100644 (file)
@@ -69,7 +69,7 @@ static const struct interface_config *find_config_by_hwaddr(
                uint8_t *hwaddr)
 {
        const struct config *config;
-       int i;
+       unsigned int i;
 
        config = config_get();
        if (!config)
@@ -219,6 +219,7 @@ static void configure_interface_dhcp(struct interface *interface)
                pb_system_apps.udhcpc,
                "-R",
                "-n",
+               "-O", "pxeconffile",
                "-p", pidfile,
                "-i", interface->name,
                NULL,
@@ -369,6 +370,7 @@ static int network_handle_nlmsg(struct network *network, struct nlmsghdr *nlmsg)
        info = NLMSG_DATA(nlmsg);
 
        have_ifaddr = have_ifname = false;
+       mtu = 1;
 
        attrlen = nlmsg->nlmsg_len - sizeof(*info);
 
@@ -483,7 +485,8 @@ retry:
 static void network_init_dns(struct network *network)
 {
        const struct config *config;
-       int i, rc, len;
+       unsigned int i;
+       int rc, len;
        bool modified;
        char *buf;