From owner-svn-src-head@freebsd.org Thu Jan 16 20:16:55 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21A881F469B; Thu, 16 Jan 2020 20:16:55 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47zFpb06hMz4XGk; Thu, 16 Jan 2020 20:16:55 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E66C04D89; Thu, 16 Jan 2020 20:16:54 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f176.google.com with SMTP id i13so20008164qtr.3; Thu, 16 Jan 2020 12:16:54 -0800 (PST) X-Gm-Message-State: APjAAAV/GUrx7lmfOVFo59NTcBOXMw0kTMJ83g9kGXmgtr9GHUBpPyWj CGCP0HVD7luFteeJ1q2c8JEmRchU4ZDXl+p3Ang= X-Google-Smtp-Source: APXvYqyoqCMoPJGQgscSrh5ymDASQJd/O5HB2Mm7tOkuAtssL/JdnSEpyb1hpD2zTwq1I5B9kA4CfsAIGwjko+HBJ7s= X-Received: by 2002:aed:2fa1:: with SMTP id m30mr4016464qtd.211.1579205814504; Thu, 16 Jan 2020 12:16:54 -0800 (PST) MIME-Version: 1.0 References: <202001162012.00GKCFWK092527@repo.freebsd.org> In-Reply-To: <202001162012.00GKCFWK092527@repo.freebsd.org> From: Kyle Evans Date: Thu, 16 Jan 2020 14:16:42 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r356801 - head/sys/netgraph To: Kirill Ponomarev , Julian Elischer Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jan 2020 20:16:55 -0000 On Thu, Jan 16, 2020 at 2:12 PM Kirill Ponomarev 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"