summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrpokala <rpokala@FreeBSD.org>2017-05-18 23:41:18 +0000
committerLuiz Souza <luiz@netgate.com>2017-07-17 21:19:50 -0500
commit9b2b855988274625ed4b003bdcbfdb4619195961 (patch)
tree42c115440d3dc189e5a8bb51cebe7e78e82b3537
parent851facc5c65250bb16c0da08a4aeb3f56d060354 (diff)
downloadFreeBSD-src-9b2b855988274625ed4b003bdcbfdb4619195961.zip
FreeBSD-src-9b2b855988274625ed4b003bdcbfdb4619195961.tar.gz
Persistently store NIC's hardware MAC address, and add a way to retrive it
jhb pointed out that (struct ifnet) is part of the network driver KBI, and thus the offsets of internal fields must not change. Therefore, move the new "if_hw_addr" field to the end, and consume one of the "if_pspare"s; that's what they're there for. The new field replaces the *last* element of that array; that way, offsetof(if_pspare) and offsetof(if_ispare) are unchanged compared to before r318397. PR: 194386 Reviewed by: jhb Pointyhat to: rpokala Sponsored by: Panasas (cherry picked from commit 53168a58b2d5e27ea918b00e0398e6629c91864c)
-rw-r--r--sys/net/if_var.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 44296f2..765fc99 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -241,7 +241,6 @@ struct ifnet {
struct ifmultihead if_multiaddrs; /* multicast addresses configured */
int if_amcount; /* number of all-multicast requests */
struct ifaddr *if_addr; /* pointer to link-level address */
- void *if_hw_addr; /* hardware link-level address */
const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */
struct rwlock if_afdata_lock;
void *if_afdata[AF_MAX];
OpenPOWER on IntegriCloud