svn commit: r356801 - head/sys/netgraph
Kyle Evans
kevans at freebsd.org
Thu Jan 16 20:16:55 UTC 2020
On Thu, Jan 16, 2020 at 2:12 PM Kirill Ponomarev <krion at freebsd.org> wrote:
>
> 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
>
Err, I was kinda wanting to get a sanity check from Julian before
proceeding on this... I've CC'd him here, patch included below since
it's minimal.
Thanks,
Kyle Evans
> 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 */
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"
More information about the svn-src-all
mailing list