summaryrefslogtreecommitdiffstats
path: root/discover/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'discover/network.c')
-rw-r--r--discover/network.c12
1 files changed, 10 insertions, 2 deletions
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;
OpenPOWER on IntegriCloud