From: David Miller <davem@davemloft.net>
To: aranea@aixah.de
Cc: kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] veth: Initialize dev->perm_addr
Date: Wed, 26 Aug 2020 09:33:29 -0700 (PDT) [thread overview]
Message-ID: <20200826.093329.96316850316598868.davem@davemloft.net> (raw)
In-Reply-To: <20200826162901.4js4u5u2whusp4l4@vega>
From: Mira Ressel <aranea@aixah.de>
Date: Wed, 26 Aug 2020 16:29:01 +0000
> On Wed, Aug 26, 2020 at 08:28:57AM -0700, David Miller wrote:
>> From: Mira Ressel <aranea@aixah.de>
>> Date: Wed, 26 Aug 2020 15:20:00 +0000
>>
>> > I'm setting the peer->perm_addr, which would otherwise be zero, to its
>> > dev_addr, which has been either generated randomly by the kernel or
>> > provided by userland in a netlink attribute.
>>
>> Which by definition makes it not necessarily a "permanent address" and
>> therefore is subject to being different across boots, which is exactly
>> what you don't want to happen for automatic address generation.
>
> That's true, but since veth devices aren't backed by any hardware, I
> unfortunately don't have a good source for a permanent address. The only
> inherently permanent thing about them is their name.
>
> People who use the default eui64-based address generation don't get
> persistent link-local addresses for their veth devices out of the box
> either -- the EUI64 is derived from the device's dev_addr, which is
> randomized by default.
>
> If that presents a problem for anyone, they can configure their userland
> to set the dev_addr to a static value, which handily fixes this problem
> for both address generation algorithms.
>
> I'm admittedly glancing over one problem here -- I'm only setting the
> perm_addr during device creation, whereas userland can change the
> dev_addr at any time. I'm not sure if it'd make sense here to update the
> perm_addr if the dev_addr is changed later on?
We are talking about which parent device address to inherit from, you
have choosen to use dev_addr and I am saying you should use perm_addr.
Can you explain why this isn't clear?
next prev parent reply other threads:[~2020-08-26 16:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 14:38 [PATCH 1/2] veth: Initialize dev->perm_addr Mira Ressel
2020-08-24 14:47 ` [PATCH 2/2] vlan: " Mira Ressel
2020-08-24 17:25 ` [PATCH 1/2] veth: " David Miller
2020-08-26 15:20 ` Mira Ressel
2020-08-26 15:28 ` David Miller
2020-08-26 16:29 ` Mira Ressel
2020-08-26 16:33 ` David Miller [this message]
2020-08-27 1:04 ` Mira Ressel
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=20200826.093329.96316850316598868.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=aranea@aixah.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox