Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp247628pxa; Wed, 26 Aug 2020 09:31:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5rWRuwTPvtNLhu4xhu7ERg6zsGK7Id/bjwBQHgqVT/gSCp3iRnwd+1bMf8SXnmwQPh4Zb X-Received: by 2002:a17:907:1050:: with SMTP id oy16mr16537168ejb.28.1598459464945; Wed, 26 Aug 2020 09:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598459464; cv=none; d=google.com; s=arc-20160816; b=DNeWKZBkcdaN376cisrWHaXN3auS4nr5jrE+kNKCRcdsiLCg7AjOlIq+vXoJagQ6xv kshnKfdlG3lzvF9on3r2XIOj2r0CfCRDCAyX8R5mUDKjvwvU3lOWZlTNsU1wTTowFLTM OTHo74dyUZZ4qrzKbTTXxs18K4umwA4vsqrfnIc1zugQ4iykWJzRlmGy1nCNyLbWeeDq z3ZvMv8ilX3MI1gFlZkUuBssqYEuav3fw6mdoxZXu1y9mkNWoY7MQJi4+TIHaGCQSJXu Pi+Gr3miMsCK3vNo+ZnXDwCU2ICDRZQXLCfS+4C+hnoQgT/ohnsmn72Nwdl3/2DWV3B2 YHeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=uSOvEcQaqddPwizXQnRzqoFfD6pthJq2HRRXeaGIx8M=; b=lIH2FtFay418fp9/KPF8oAZF8ACBmr/LIOIHL7x6PGVi1vCU4rbcPDtVsKH/UWAmtC +cU4ZKkAlbCVGxvCSxkQkSCluWFvy8pGkWnb5K+QzmhxggLPrkke3NYjYpLigLzxAG2Y 6QANBiSZZSuB2Bu2vpyIa7h+bzvOZDgU+MhJJ3F9GTRZOR4JbN2sNEtonP9hjSLmvxVu xuk3CbcvryOjfHUs8JVGxqirtQ6GW0dL93ppc260nZVE7ZTlmFUFB26ZeCKK9DAT/QAt kPW090OzifDUGH5erVXkL84snRK5mm3fZps9GrNfnqZnRtxU08LCXfCM8Va3560zqljF 6jxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aixah.de header.s=MBO0001 header.b="F7Rn3/52"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 24si2220761edv.581.2020.08.26.09.30.41; Wed, 26 Aug 2020 09:31:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@aixah.de header.s=MBO0001 header.b="F7Rn3/52"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728069AbgHZQ3N (ORCPT + 99 others); Wed, 26 Aug 2020 12:29:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbgHZQ3L (ORCPT ); Wed, 26 Aug 2020 12:29:11 -0400 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050::465:201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABBE5C061574; Wed, 26 Aug 2020 09:29:10 -0700 (PDT) Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4BcBBp3DBPzQlWV; Wed, 26 Aug 2020 18:29:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aixah.de; s=MBO0001; t=1598459344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uSOvEcQaqddPwizXQnRzqoFfD6pthJq2HRRXeaGIx8M=; b=F7Rn3/52abVlbiyS+9PvjmJ6SOCVWHECo3aqTkkprLLdU93By4s4UXs/jsBBxN1SoCxXrW +ySjwsVnkIOD45Bm5JppLMDrvq7lbscCoVXHdW+x43Wd9H3kAdAVK9iwp9Gf2lVvslwEcf nH0yWKaapXuXZv+3fkOYoPmpHUwfwpfO4xbsR0SIPK5wZxNmz71L5sOxUq1VLQv8gGiSSe 9fSu5FMoMJWSWJvtTLiYZ4Y+ur3Nrq8cWHZKSju1tCbsFgaJGsxl8y+0Oa4eI8Te8dIMds fPxhOyUGGiZ4GVQf1IpRn79XYY3IOQoJfDAFiSRkK9glUJ4rGNgpU3EKRduJRw== Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id X6Skw1EjWZS6; Wed, 26 Aug 2020 18:29:02 +0200 (CEST) Date: Wed, 26 Aug 2020 16:29:01 +0000 From: Mira Ressel To: David Miller Cc: kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] veth: Initialize dev->perm_addr Message-ID: <20200826162901.4js4u5u2whusp4l4@vega> References: <20200824143828.5964-1-aranea@aixah.de> <20200824.102545.1450838041398463071.davem@davemloft.net> <20200826152000.ckxrcfyetdvuvqum@vega> <20200826.082857.584544823490249841.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200826.082857.584544823490249841.davem@davemloft.net> X-MBO-SPAM-Probability: X-Rspamd-Score: -2.01 / 15.00 / 15.00 X-Rspamd-Queue-Id: 5F31466D X-Rspamd-UID: cce744 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2020 at 08:28:57AM -0700, David Miller wrote: > From: Mira Ressel > 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? -- Regards, Mira