Date: Thu, 11 May 2017 11:08:51 +0530 From: "Kristof Provost" <kristof@sigsegv.be> To: "Ravi Pokala" <rpokala@FreeBSD.org> 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 Message-ID: <B2375985-9211-482A-A5EC-98F0077E60DF@sigsegv.be> In-Reply-To: <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> References: <201705102213.v4AMDlE2074710@repo.freebsd.org> <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11 May 2017, at 11:05, Kristof Provost wrote: > 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 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- 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 =3D 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 !=3D 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=3D0xfffff80035663000, = > lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:91= 9 > #12 0xffffffff8325dc67 in bridge_clone_create (ifc=3D<value optimized = > out>, unit=3D<value optimized out>, params=3D<value optimized out>) at = > /usr/src/sys/net/if_bridge.c:704 > #13 0xffffffff80b54f54 in if_clone_createif (ifc=3D0xfffff80035081500, = > name=3D0xfffffe03e7936780 "bridge0", len=3D<value optimized out>, = > params=3D0x0) at /usr/src/sys/net/if_clone.c:685 > #14 0xffffffff80b50833 in ifioctl (so=3D<value optimized out>, = > cmd=3D3223349628, data=3D<value optimized out>, td=3D<value optimized o= ut>) = > at /usr/src/sys/net/if.c:2794 > #15 0xffffffff80abc00d in kern_ioctl (td=3D<value optimized out>, = > fd=3D<value optimized out>, com=3D<value optimized out>, data=3D<value = > optimized out>) at file.h:323 > #16 0xffffffff80abbccf in sys_ioctl (td=3D<value optimized out>, = > uap=3D0xfffffe03e7936930) at /usr/src/sys/kern/sys_generic.c:745 > #17 0xffffffff80efc059 in amd64_syscall (td=3D0xfffff80009114000, = > traced=3D0) 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=3D0xfffff80035663000, = > lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:91= 9 > 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); > (kgdb) p ifp->if_hw_addr > $1 =3D (void *) 0x0 > This may be because I=E2=80=99ve not yet updated world, just the kernel, = but = clearly that still shouldn=E2=80=99t cause panics. Regards, Kristof
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B2375985-9211-482A-A5EC-98F0077E60DF>