summaryrefslogtreecommitdiffstats
path: root/net/ifup.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-05-14 16:05:36 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-05-15 08:15:13 +0200
commit75482a0663d789a7bc55eedff4a4f6fed0d3f811 (patch)
tree2851702881cbb34ccd6cb470dff311f57e7472cc /net/ifup.c
parente70492fac20849604f665090106b31433c9988ba (diff)
downloadbarebox-75482a0663d789a7bc55eedff4a4f6fed0d3f811.tar.gz
barebox-75482a0663d789a7bc55eedff4a4f6fed0d3f811.tar.xz
net: ifup: Set current ethernet device when doing ifup
When doing an ifup set the current interface to the one just brought up so that it is actually used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net/ifup.c')
-rw-r--r--net/ifup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ifup.c b/net/ifup.c
index 409b338ec1..f3b65f780f 100644
--- a/net/ifup.c
+++ b/net/ifup.c
@@ -58,6 +58,8 @@ int ifup(const char *name, unsigned flags)
if (edev && edev->ipaddr && !(flags & IFUP_FLAG_FORCE))
return 0;
+ eth_set_current(edev);
+
env_push_context();
setenv("ip", "");