Common storage of original MAC address
John Baldwin
jhb at freebsd.org
Wed Aug 20 16:00:49 UTC 2014
On Tuesday, August 19, 2014 1:19:02 am Pokala, Ravi wrote:
> Or how about an ioctl to get the original MAC (rather than a sysctl). Then
> the "restore to default" code would be a two-step process - get the
> original MAC with the new ioctl (say "SIOCGHWLLADDR" for "Get Hardware
> LLADDR"?), and then set the working MAC to that value w/ the existing
> ioctl (SIOCSIFLLADDR).
>
> I actually like this idea more than the sysctl, because it could be done
> in one place (probably in net/if.c, next to if_setlladdr() (which is what
> implements the guts of SIOCSIFLLADDR)).
>
> Does that sound like a plan?
I prefer this approach as it preserves the original lladdr as an lladdr rather
than a string. You could add something to ifconfig to display the hardware
address (perhaps have ifconfig display it by default if it differs from the
currently configured MAC)
--
John Baldwin
More information about the freebsd-hackers
mailing list