]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add
authorrpokala <rpokala@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 17 May 2017 22:29:25 +0000 (22:29 +0000)
committerrpokala <rpokala@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 17 May 2017 22:29:25 +0000 (22:29 +0000)
commit3c55df4fbac5f81903b97e7a1a6fe550f27ca583
treeb2d309a8e52a1ac150a4313fc6caf15b78014f9a
parent2d7393012debaf4d249e18a3fa45a3187c68a25d
MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add
a way to retrive it

NOTE: Due to restructuring, the merges didn't apply cleanly; the resulting
change is almost identical to what went into stable/11, but in some cases in
different locations.

The MAC address reported by `ifconfig ${nic} ether' does not always match
the address in the hardware, as reported by the driver during attach. In
particular, NICs which are components of a lagg(4) interface all report the
same MAC.

When attaching, the NIC driver passes the MAC address it read from the
hardware as an argument to ether_ifattach(). Keep a second copy of it, and
create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along
with the active MAC address.

PR: 194386

git-svn-id: svn://svn.freebsd.org/base/stable/10@318430 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/ifconfig/af_link.c
sys/net/if.c
sys/net/if_ethersubr.c
sys/net/if_var.h
sys/sys/sockio.h