svn commit: r356801 - head/sys/netgraph
Kirill Ponomarev
krion at FreeBSD.org
Thu Jan 16 20:12:16 UTC 2020
Author: krion (ports committer)
Date: Thu Jan 16 20:12:15 2020
New Revision: 356801
URL: https://svnweb.freebsd.org/changeset/base/356801
Log:
Generate MAC address from the FreeBSD OUI range.
Submitted by: aleksandr.fedorov_vstack_com
Approved by: kevans
Differential Revision: https://reviews.freebsd.org/D23168
Modified:
head/sys/netgraph/ng_eiface.c
Modified: head/sys/netgraph/ng_eiface.c
==============================================================================
--- head/sys/netgraph/ng_eiface.c Thu Jan 16 20:02:41 2020 (r356800)
+++ head/sys/netgraph/ng_eiface.c Thu Jan 16 20:12:15 2020 (r356801)
@@ -385,7 +385,7 @@ ng_eiface_constructor(node_p node)
{
struct ifnet *ifp;
priv_p priv;
- u_char eaddr[6] = {0,0,0,0,0,0};
+ struct ether_addr eaddr;
/* Allocate node and interface private structures */
priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO);
@@ -435,7 +435,8 @@ ng_eiface_constructor(node_p node)
ifp->if_xname);
/* Attach the interface */
- ether_ifattach(ifp, eaddr);
+ ether_gen_addr(ifp, &eaddr);
+ ether_ifattach(ifp, eaddr.octet);
ifp->if_baudrate = ifmedia_baudrate(IFM_ETHER | IFM_1000_T);
/* Done */
More information about the svn-src-all
mailing list