Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2009 11:09:55 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        freebsd-arch@freebsd.org
Subject:   Unique machine identifier for nfsv4 client
Message-ID:  <Pine.GSO.4.63.0903301057020.13442@muncher.cs.uoguelph.ca>

next in thread | raw e-mail | index | archive | help
An nfsv4 client needs a unique identifier that is persistent across
reboots. My code currently uses the MAC address of the first net
interface that it can find that has an Ethernet style MAC.

There are two problems with this:
1 - If it can't find a net interface with a MAC, it falls back on a
     randomly generated identifier, which changes when it is rebooted.
2 - The code that finds the MAC breaks layering (ie knows stuff about
     the network code like struct ifnet) and only builds if
     "options VIMAGE_GLOBALS" is set.

Can anyone suggest a better way to do this?

If not, would it be reasonable to put a function in sys/net that returns
a MAC address if it can find one? (At least this gets around the
"options VIMAGE_GLOBALS" issue.)

Thanks in advance for any help, rick




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.63.0903301057020.13442>