diff mbox series

[v10,8/9] sandbox: Update the test MAC/IP addresses

Message ID 20211022030852.1986718-7-sjg@chromium.org
State Accepted
Commit 1d192d5bccc6e4b9e7112f720ccc47786694ee39
Delegated to: Tom Rini
Headers show
Series env: Allow environment in text files | expand

Commit Message

Simon Glass Oct. 22, 2021, 3:08 a.m. UTC
These conflict with real-word addresses. Use locally administered
MAC addresses and a suitable IPv4 address from 192.0.2.0/24
(TEST-NET-1).

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Alexander Dahl <ada@thorsis.com>
---

Changes in v10:
- Add new patch to update the test MAC/IP addresses

 board/sandbox/sandbox.env | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Heinrich Schuchardt Oct. 23, 2021, 8:29 a.m. UTC | #1
On 10/22/21 05:08, Simon Glass wrote:
> These conflict with real-word addresses. Use locally administered
> MAC addresses and a suitable IPv4 address from 192.0.2.0/24
> (TEST-NET-1).
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Suggested-by: Alexander Dahl <ada@thorsis.com>
> ---
>
> Changes in v10:
> - Add new patch to update the test MAC/IP addresses
>
>   board/sandbox/sandbox.env | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env
> index 0f8d95b8db0..b4c04635a48 100644
> --- a/board/sandbox/sandbox.env
> +++ b/board/sandbox/sandbox.env
> @@ -5,13 +5,13 @@ stdin+=,cros-ec-keyb,usbkbd
>   stdout=serial,vidconsole
>   stderr=serial,vidconsole
>
> -ethaddr=00:00:11:22:33:44
> -eth2addr=00:00:11:22:33:48
> -eth3addr=00:00:11:22:33:45
> -eth4addr=00:00:11:22:33:48
> -eth5addr=00:00:11:22:33:46
> -eth6addr=00:00:11:22:33:47
> -ipaddr=1.2.3.4
> +ethaddr=02:00:11:22:33:44
> +eth2addr=02:00:11:22:33:48
> +eth3addr=02:00:11:22:33:45
> +eth4addr=02:00:11:22:33:48

Ethernet addresses should be unique.

Should it be on purpose that two Ethernet address are the same, please
add a comment in the code.

Best regards

Heinrich

> +eth5addr=02:00:11:22:33:46
> +eth6addr=02:00:11:22:33:47
> +ipaddr=192.0.2.1
>
>   /*
>    * These are used for distro boot which is not supported. But once bootmethod
>
Simon Glass Oct. 24, 2021, 7:54 p.m. UTC | #2
Hi Heinrich,

On Sat, 23 Oct 2021 at 02:30, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
>
>
> On 10/22/21 05:08, Simon Glass wrote:
> > These conflict with real-word addresses. Use locally administered
> > MAC addresses and a suitable IPv4 address from 192.0.2.0/24
> > (TEST-NET-1).
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > Suggested-by: Alexander Dahl <ada@thorsis.com>
> > ---
> >
> > Changes in v10:
> > - Add new patch to update the test MAC/IP addresses
> >
> >   board/sandbox/sandbox.env | 14 +++++++-------
> >   1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env
> > index 0f8d95b8db0..b4c04635a48 100644
> > --- a/board/sandbox/sandbox.env
> > +++ b/board/sandbox/sandbox.env
> > @@ -5,13 +5,13 @@ stdin+=,cros-ec-keyb,usbkbd
> >   stdout=serial,vidconsole
> >   stderr=serial,vidconsole
> >
> > -ethaddr=00:00:11:22:33:44
> > -eth2addr=00:00:11:22:33:48
> > -eth3addr=00:00:11:22:33:45
> > -eth4addr=00:00:11:22:33:48
> > -eth5addr=00:00:11:22:33:46
> > -eth6addr=00:00:11:22:33:47
> > -ipaddr=1.2.3.4
> > +ethaddr=02:00:11:22:33:44
> > +eth2addr=02:00:11:22:33:48
> > +eth3addr=02:00:11:22:33:45
> > +eth4addr=02:00:11:22:33:48
>
> Ethernet addresses should be unique.
>
> Should it be on purpose that two Ethernet address are the same, please
> add a comment in the code.

Can you please explain what you are getting out here? Which ones are not unique?

> > +eth5addr=02:00:11:22:33:46
> > +eth6addr=02:00:11:22:33:47
> > +ipaddr=192.0.2.1
> >
> >   /*
> >    * These are used for distro boot which is not supported. But once bootmethod
> >

Regards,
Simon
Tom Rini Oct. 24, 2021, 9:39 p.m. UTC | #3
On Sun, Oct 24, 2021 at 01:54:17PM -0600, Simon Glass wrote:
> Hi Heinrich,
> 
> On Sat, 23 Oct 2021 at 02:30, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> >
> >
> >
> > On 10/22/21 05:08, Simon Glass wrote:
> > > These conflict with real-word addresses. Use locally administered
> > > MAC addresses and a suitable IPv4 address from 192.0.2.0/24
> > > (TEST-NET-1).
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > Suggested-by: Alexander Dahl <ada@thorsis.com>
> > > ---
> > >
> > > Changes in v10:
> > > - Add new patch to update the test MAC/IP addresses
> > >
> > >   board/sandbox/sandbox.env | 14 +++++++-------
> > >   1 file changed, 7 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env
> > > index 0f8d95b8db0..b4c04635a48 100644
> > > --- a/board/sandbox/sandbox.env
> > > +++ b/board/sandbox/sandbox.env
> > > @@ -5,13 +5,13 @@ stdin+=,cros-ec-keyb,usbkbd
> > >   stdout=serial,vidconsole
> > >   stderr=serial,vidconsole
> > >
> > > -ethaddr=00:00:11:22:33:44
> > > -eth2addr=00:00:11:22:33:48
> > > -eth3addr=00:00:11:22:33:45
> > > -eth4addr=00:00:11:22:33:48
> > > -eth5addr=00:00:11:22:33:46
> > > -eth6addr=00:00:11:22:33:47
> > > -ipaddr=1.2.3.4
> > > +ethaddr=02:00:11:22:33:44
> > > +eth2addr=02:00:11:22:33:48
> > > +eth3addr=02:00:11:22:33:45
> > > +eth4addr=02:00:11:22:33:48
> >
> > Ethernet addresses should be unique.
> >
> > Should it be on purpose that two Ethernet address are the same, please
> > add a comment in the code.
> 
> Can you please explain what you are getting out here? Which ones are not unique?

I think you made a mistake ages ago by not doing eth..eth6 in sequence
and updating the last digit each time.  Before and after eth2addr and
eth4addr both end in 48.
diff mbox series

Patch

diff --git a/board/sandbox/sandbox.env b/board/sandbox/sandbox.env
index 0f8d95b8db0..b4c04635a48 100644
--- a/board/sandbox/sandbox.env
+++ b/board/sandbox/sandbox.env
@@ -5,13 +5,13 @@  stdin+=,cros-ec-keyb,usbkbd
 stdout=serial,vidconsole
 stderr=serial,vidconsole
 
-ethaddr=00:00:11:22:33:44
-eth2addr=00:00:11:22:33:48
-eth3addr=00:00:11:22:33:45
-eth4addr=00:00:11:22:33:48
-eth5addr=00:00:11:22:33:46
-eth6addr=00:00:11:22:33:47
-ipaddr=1.2.3.4
+ethaddr=02:00:11:22:33:44
+eth2addr=02:00:11:22:33:48
+eth3addr=02:00:11:22:33:45
+eth4addr=02:00:11:22:33:48
+eth5addr=02:00:11:22:33:46
+eth6addr=02:00:11:22:33:47
+ipaddr=192.0.2.1
 
 /*
  * These are used for distro boot which is not supported. But once bootmethod