diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/eth_common.c | 3 | ||||
-rw-r--r-- | net/link_local.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/net/eth_common.c b/net/eth_common.c index e9d3c66..58fa295 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); diff --git a/net/link_local.c b/net/link_local.c index 27851b6..dfd240d 100644 --- a/net/link_local.c +++ b/net/link_local.c @@ -111,7 +111,7 @@ void link_local_start(void) net_set_state(NETLOOP_FAIL); return; } - net_netmask.s_addr = IN_CLASSB_NET; + net_netmask.s_addr = htonl(IN_CLASSB_NET); seed = seed_mac(); if (ip.s_addr == 0) |