In the root net namespace if have the following devices: > ip link [...] 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff 3: gre0: <NOARP> mtu 1476 qdisc noop state DOWN mode DEFAULT group default link/gre 0.0.0.0 brd 0.0.0.0 [...] Let's add a macvlan on top of eth0: > ip link [...] 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff 3: gre0: <NOARP> mtu 1476 qdisc noop state DOWN mode DEFAULT group default link/gre 0.0.0.0 brd 0.0.0.0 [...] 17: mac0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default link/ether 46:aa:b4:fb:44:a6 brd ff:ff:ff:ff:ff:ff And now lets move it into its own net namespace and list the devices in the new namespace. > ip link set mac0 netns myns > ip netns exec myns ip link [...] 2: gre0: <NOARP> mtu 1476 qdisc noop state DOWN mode DEFAULT group default link/gre 0.0.0.0 brd 0.0.0.0 [...] 17: mac0@gre0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default link/ether 46:aa:b4:fb:44:a6 brd ff:ff:ff:ff:ff:ff mac0 shows gre0 as its base device which is not correct. However gre0 has the same ifindex in the new namespace as eth0 in the root namespace and the ifindex is used for finding the base device. commit aa79e66eee5d525e2fcbd2a5fcb87ae3dd4aa9e9 "net: Make ifindex generation per-net namespace" changed the ifindex generation to only be unique within a namespace.
If you've not already done so then please report to netdev@vger.kernel.org
The ip link is reporting what kernel state is. The iflink in kernel is no longer valid when device changes namespace.