[PATCH 1/4] net: ifup: Set current ethernet device when doing ifup

Sascha Hauer s.hauer at pengutronix.de
Wed May 14 23:32:12 PDT 2014


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 at pengutronix.de>
---
 net/ifup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ifup.c b/net/ifup.c
index 409b338..f3b65f7 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", "");
-- 
2.0.0.rc0




More information about the barebox mailing list