From owner-svn-src-head@freebsd.org Thu May 11 05:36:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FFA9D689CD; Thu, 11 May 2017 05:36:07 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A6E61244; Thu, 11 May 2017 05:36:03 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from [172.16.16.31] (unknown [119.161.97.34]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id A1C05994A; Thu, 11 May 2017 07:35:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1494480960; bh=H5R7jQlNXsH6G3KB8PmwNxb0/cePE6nWgW/Bgrmz3M0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ygd08d4QtqzhQvopsprePNyo4vzOLsUXfn0etMWzOsy+PS9GSmu1cJoBKy4I6gvHo qLbMJytc5PDw6iBVBhtSpe50wAtRTnXu3dL2ktTie+f3EVeX74fYCIPIwUC4diE0Kp 6YpnQomlVnR/Yz2pwutSzfNHJ6c/Sf+4YzTSL1n0= From: "Kristof Provost" To: "Ravi Pokala" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys Date: Thu, 11 May 2017 11:05:57 +0530 Message-ID: <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> In-Reply-To: <201705102213.v4AMDlE2074710@repo.freebsd.org> References: <201705102213.v4AMDlE2074710@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (2.0BETAr6082) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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, 11 May 2017 05:36:07 -0000 On 11 May 2017, at 3:43, Ravi Pokala wrote: > Author: rpokala > Date: Wed May 10 22:13:47 2017 > New Revision: 318160 > URL: https://svnweb.freebsd.org/changeset/base/318160 > > Log: > Persistently store NIC's hardware MAC address, and add a way to > retrive it > > Modified: head/sys/net/if_ethersubr.c > ============================================================================== > --- head/sys/net/if_ethersubr.c Wed May 10 21:42:16 2017 (r318159) > +++ head/sys/net/if_ethersubr.c Wed May 10 22:13:47 2017 (r318160) > @@ -916,6 +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); > + > bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); > if (ng_ether_attach_p != NULL) > (*ng_ether_attach_p)(ifp); > This seems to cause panics when I create a bridge interface: #10 0xffffffff80ef9304 in bcopy () at /usr/src/sys/amd64/amd64/support.S:139 #11 0xffffffff80b57a80 in ether_ifattach (ifp=0xfffff80035663000, lla=0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 #12 0xffffffff8325dc67 in bridge_clone_create (ifc=, unit=, params=) at /usr/src/sys/net/if_bridge.c:704 #13 0xffffffff80b54f54 in if_clone_createif (ifc=0xfffff80035081500, name=0xfffffe03e7936780 "bridge0", len=, params=0x0) at /usr/src/sys/net/if_clone.c:685 #14 0xffffffff80b50833 in ifioctl (so=, cmd=3223349628, data=, td=) at /usr/src/sys/net/if.c:2794 #15 0xffffffff80abc00d in kern_ioctl (td=, fd=, com=, data=) at file.h:323 #16 0xffffffff80abbccf in sys_ioctl (td=, uap=0xfffffe03e7936930) at /usr/src/sys/kern/sys_generic.c:745 #17 0xffffffff80efc059 in amd64_syscall (td=0xfffff80009114000, traced=0) at subr_syscall.c:136 #18 0xffffffff80edd09b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:396 ifp->if_hw_addr is NULL here: (kgdb) fr 11 #11 0xffffffff80b57a80 in ether_ifattach (ifp=0xfffff80035663000, lla=0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); (kgdb) p ifp->if_hw_addr $1 = (void *) 0x0 Regards, Kristof