diff options
Diffstat (limited to 'net/ifup.c')
-rw-r--r-- | net/ifup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ifup.c b/net/ifup.c index 30ac3f5861..5113d13832 100644 --- a/net/ifup.c +++ b/net/ifup.c @@ -106,12 +106,21 @@ int ifup(const char *name, unsigned flags) ret = eth_set_param(dev, "serverip"); if (ret) goto out; + dev_set_param(dev, "linux.bootargs", "ip=dhcp"); } else if (!strcmp(ip, "static")) { + char *bootarg; for (i = 0; i < ARRAY_SIZE(vars); i++) { ret = eth_set_param(dev, vars[i]); if (ret) goto out; } + bootarg = basprintf("ip=%pI4:%pI4:%pI4:%pI4:::", + &edev->ipaddr, + &edev->serverip, + &edev->gateway, + &edev->netmask); + dev_set_param(dev, "linux.bootargs", bootarg); + free(bootarg); } else { pr_err("unknown ip type: %s\n", ip); ret = -EINVAL; |