Date: Thu, 11 May 2017 06:46:39 +0000 (UTC) From: Ravi Pokala <rpokala@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318176 - head/sys/net Message-ID: <201705110646.v4B6kdCM082326@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpokala Date: Thu May 11 06:46:39 2017 New Revision: 318176 URL: https://svnweb.freebsd.org/changeset/base/318176 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it An earlier version of r318160 allocated if_hw_addr unconditionally; when it became conditional, I forgot to check for NULL in ether_ifattach(). Reviewed by: kp MFC after: 1 week MFC with: r318160 Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D10678 Pointy-hat to: rpokala Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu May 11 06:35:23 2017 (r318175) +++ head/sys/net/if_ethersubr.c Thu May 11 06:46:39 2017 (r318176) @@ -916,7 +916,8 @@ ether_ifattach(struct ifnet *ifp, const sdl->sdl_alen = ifp->if_addrlen; bcopy(lla, LLADDR(sdl), ifp->if_addrlen); - bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); + if (ifp->if_hw_addr != NULL) + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); if (ng_ether_attach_p != NULL)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705110646.v4B6kdCM082326>