From 7aba0f2c2ce80406661ea2dc79ea1892cc93a26f Mon Sep 17 00:00:00 2001 From: Gong Qianyu Date: Mon, 31 Aug 2015 11:34:43 +0800 Subject: [PATCH] net/eth: fix a bug in on_ethaddr() The loop should check all ethenet devices, not only the first device, to set each specified ethaddr, or it'll cause failure when we use other devices. Signed-off-by: Gong Qianyu Acked-by: Joe Hershberger --- net/eth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/eth.c b/net/eth.c index 2e24b55726..e9b22d823f 100644 --- a/net/eth.c +++ b/net/eth.c @@ -691,6 +691,7 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op, memset(dev->enetaddr, 0, 6); } } + dev = dev->next; } while (dev != eth_devices); return 0; -- 2.39.5