aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-03-02 02:45:57 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-03-02 02:45:57 +0000
commit072afcdffca7de7416bf71f82a9b5bcc869afad2 (patch)
tree778950cf68673f738b09ead6d3816ef9e279b27f
parent79bfb05b074873a2c02f0733456ecf269656bef6 (diff)
Notes
-rw-r--r--sys/net/if_edsc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/net/if_edsc.c b/sys/net/if_edsc.c
index 4e262a64991b5..85a8e8cca2d3d 100644
--- a/sys/net/if_edsc.c
+++ b/sys/net/if_edsc.c
@@ -98,7 +98,7 @@ edsc_clone_create(struct if_clone *ifc, int unit, caddr_t params)
{
struct edsc_softc *sc;
struct ifnet *ifp;
- static u_char eaddr[ETHER_ADDR_LEN]; /* 0:0:0:0:0:0 */
+ struct ether_addr eaddr;
/*
* Allocate soft and ifnet structures. Link each to the other.
@@ -149,11 +149,15 @@ edsc_clone_create(struct if_clone *ifc, int unit, caddr_t params)
ifp->if_snd.ifq_maxlen = ifqmaxlen;
/*
+ * Generate an arbitrary MAC address for the cloned interface.
+ */
+ ether_gen_addr(ifp, &eaddr);
+
+ /*
* Do ifnet initializations common to all Ethernet drivers
* and attach to the network interface framework.
- * TODO: Pick a non-zero link level address.
*/
- ether_ifattach(ifp, eaddr);
+ ether_ifattach(ifp, eaddr.octet);
/*
* Now we can mark the interface as running, i.e., ready