X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fnetwork.c;h=c300f3dc7719619aa6092df5b476837ff8177b74;hp=9da0f7a72526837011c67191152e4653c048e12c;hb=a984595cfb4910ba6f464c69c316f1613f10f894;hpb=67e015d08f9a9f53b1ec0a6c301ce1a9516ea69a diff --git a/discover/network.c b/discover/network.c index 9da0f7a..c300f3d 100644 --- a/discover/network.c +++ b/discover/network.c @@ -212,8 +212,9 @@ static void udhcpc_process_exit(struct process *process) static void configure_interface_dhcp(struct interface *interface) { + const struct platform *platform; + char pidfile[256], id[10]; struct process *process; - char pidfile[256]; int rc; const char *argv[] = { pb_system_apps.udhcpc, @@ -221,14 +222,21 @@ static void configure_interface_dhcp(struct interface *interface) "-n", "-O", "pxeconffile", "-O", "pxepathprefix", - "-x", "0x5d:000a", "-p", pidfile, "-i", interface->name, + "-x", id, /* [11,12] - dhcp client identifier */ NULL, }; + snprintf(pidfile, sizeof(pidfile), "%s/udhcpc-%s.pid", PIDFILE_BASE, interface->name); + platform = platform_get(); + if (platform && platform->dhcp_arch_id != 0xffff) + snprintf(id, sizeof(id), "0x5d:%04x", platform->dhcp_arch_id); + else + argv[11] = NULL; + process = process_create(interface); process->path = pb_system_apps.udhcpc;