From: James Chargin <jimccrown@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: use random ethernet address if invalid and not zero
Date: Mon, 7 Nov 2016 14:25:15 -0800 [thread overview]
Message-ID: <6db45934-3069-a442-0f7f-44201006f351@gmail.com> (raw)
In-Reply-To: <CANr=Z=YmwmDfWTCdmXq9AbYgugibmt4SWS+JND5T0EHVQMH-CQ@mail.gmail.com>
Hi Joe,
Thanks for your reply.
On 11/07/2016 10:20 AM, Joe Hershberger wrote:
> Hi Jim,
>
> On Wed, Nov 2, 2016 at 8:21 AM, James Chargin <jimccrown@gmail.com> wrote:
>> Hi,
>>
>> Regarding "invalid" Ethernet address.
>>
>> Is there a reliable way to set the default environment that will prevent
>> Ethernet communications from being attempted.
>>
>> That is, when an Ethernet capable system is brand new and before an Ethernet
>> MAC address has been assigned to that system during manufacturing with the
>> "setenv ethaddr" command, how can Ethernet comms be disabled?
>>
>> This would be a fail-safe to make sure that part of the manufacturing
>> process is done correctly and that an Ethernet address is intentionally
>> assigned.
>
> There is no feature like that as far as I know. Can you not just read
> back the ethaddr variable and compare it to what you intended to
> program?
I don't understand what you are suggesting, sorry.
A long time ago I wrote code
/*
* This is an invalid MAC address.
* Having it be invalid prevents connection to
* the network until the U-Boot "setenv ethaddr"
* command is run, which selects a valid MAC
* Refer to the section titled "Null values" in
* http://standards.ieee.org/regauth/oui/tutorials/UseOfEUI.html.
*/
#define CONFIG_ETHADDR ff:ff:ff:ff:ff:ff
The referenced section says, "... The all-zeros and all-ones EUI-64
values, 00-00-00-00-00-00-00-00hex and FF-FF-FF-FF-FF-FF-FF-FFhex,
respectively, are owned by the IEEE Registration Authority and will
never be assigned, and are invalid for use as identifiers. ..." (which
doesn't really apply to my case, but I was hopeful that I could
generalize to my case)
At the time I wrote this code, I was trying to cope with a mfg process
that was about to ship systems without setting correct MAC addresses. I
was new to U-Boot at that time but found that U-Boot would not build
without CONFIG_ETHADDR defined.
I subsequently checked again and found that U-Boot connects to the
network regardless of the value of CONFIG_ETHADDR and even when it is
not defined at compile-time or run-time.
I left it there, instead I made changes to the mfg process so that
"setenv ethaddr" was more likely to always get done.
I would have liked a way to configure the default U-Boot environment so
that no network connection could be made until a MAC address had been
set, but I wasn't willing to spend any more time figuring out how to
make that happen (possibly by submitting a patch upstream)
Jim
--
Jim Chargin
AJA Video Systems jimc at aja.com
(530) 271-3334 http://www.aja.com
next prev parent reply other threads:[~2016-11-07 22:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 11:52 [U-Boot] [PATCH] net: use random ethernet address if invalid and not zero Michal Simek
2016-11-02 13:21 ` James Chargin
2016-11-07 18:20 ` Joe Hershberger
2016-11-07 22:25 ` James Chargin [this message]
2016-11-15 2:51 ` Joe Hershberger
2016-11-02 20:36 ` Joe Hershberger
2016-11-07 17:31 ` [U-Boot] " Joe Hershberger
2016-11-09 10:27 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6db45934-3069-a442-0f7f-44201006f351@gmail.com \
--to=jimccrown@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.