summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/eth_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/eth_common.c b/net/eth_common.c
index e9d3c66741..58fa295771 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -34,6 +34,9 @@ int eth_setenv_enetaddr(const char *name, const uchar *enetaddr)
{
char buf[ARP_HLEN_ASCII + 1];
+ if (eth_getenv_enetaddr(name, (uchar *)buf))
+ return -EEXIST;
+
sprintf(buf, "%pM", enetaddr);
return setenv(name, buf);