Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2020 14:16:42 -0600
From:      Kyle Evans <kevans@freebsd.org>
To:        Kirill Ponomarev <krion@freebsd.org>, Julian Elischer <julian@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r356801 - head/sys/netgraph
Message-ID:  <CACNAnaHwAbeSu_dv65Vqno0c6NLM0GQjfNM6yPdh6=ubh59yPQ@mail.gmail.com>
In-Reply-To: <202001162012.00GKCFWK092527@repo.freebsd.org>
References:  <202001162012.00GKCFWK092527@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 16, 2020 at 2:12 PM Kirill Ponomarev <krion@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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaHwAbeSu_dv65Vqno0c6NLM0GQjfNM6yPdh6=ubh59yPQ>