From: Jiri Pirko <jiri@resnulli•us>
To: Jakub Kicinski <kuba@kernel•org>
Cc: davem@davemloft•net, netdev@vger•kernel.org, edumazet@google•com,
pabeni@redhat•com
Subject: Re: [PATCH net 4/5] net: move altnames together with the netdevice
Date: Tue, 17 Oct 2023 09:51:38 +0200 [thread overview]
Message-ID: <ZS49CjLECQHdcQwv@nanopsycho> (raw)
In-Reply-To: <20231016201657.1754763-5-kuba@kernel.org>
Mon, Oct 16, 2023 at 10:16:56PM CEST, kuba@kernel•org wrote:
>The altname nodes are currently not moved to the new netns
>when netdevice itself moves:
>
> [ ~]# ip netns add test
> [ ~]# ip -netns test link add name eth0 type dummy
> [ ~]# ip -netns test link property add dev eth0 altname some-name
> [ ~]# ip -netns test link show dev some-name
> 2: eth0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
> link/ether 1e:67:ed:19:3d:24 brd ff:ff:ff:ff:ff:ff
> altname some-name
> [ ~]# ip -netns test link set dev eth0 netns 1
> [ ~]# ip link
> ...
> 3: eth0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
> link/ether 02:40:88:62:ec:b8 brd ff:ff:ff:ff:ff:ff
> altname some-name
> [ ~]# ip li show dev some-name
> Device "some-name" does not exist.
>
>Remove them from the hash table when device is unlisted
>and add back when listed again.
>
>Fixes: 36fbf1e52bd3 ("net: rtnetlink: add linkprop commands to add and delete alternative ifnames")
>Signed-off-by: Jakub Kicinski <kuba@kernel•org>
Nice, thanks!
Reviewed-by: Jiri Pirko <jiri@nvidia•com>
next prev parent reply other threads:[~2023-10-17 7:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 20:16 [PATCH net 0/5] net: fix bugs in device netns-move and rename Jakub Kicinski
2023-10-16 20:16 ` [PATCH net 1/5] net: fix ifname in netlink ntf during netns move Jakub Kicinski
2023-10-16 20:21 ` Jakub Kicinski
2023-10-16 20:16 ` [PATCH net 2/5] net: check for altname conflicts when changing netdev's netns Jakub Kicinski
2023-10-17 7:21 ` Jiri Pirko
2023-10-16 20:16 ` [PATCH net 3/5] net: avoid UAF on deleted altname Jakub Kicinski
2023-10-17 7:51 ` Jiri Pirko
2023-10-17 14:52 ` Jakub Kicinski
2023-10-17 16:10 ` Jiri Pirko
2023-10-17 16:35 ` Jiri Pirko
2023-10-17 18:07 ` Jakub Kicinski
2023-10-16 20:16 ` [PATCH net 4/5] net: move altnames together with the netdevice Jakub Kicinski
2023-10-17 7:51 ` Jiri Pirko [this message]
2023-10-16 20:16 ` [PATCH net 5/5] selftests: net: add very basic test for netdev names and namespaces Jakub Kicinski
2023-10-17 11:25 ` Przemek Kitszel
2023-10-17 14:58 ` Jakub Kicinski
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=ZS49CjLECQHdcQwv@nanopsycho \
--to=jiri@resnulli$(echo .)us \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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