linux/drivers/net/ipvlan
Venkat Venkatsubra 2297839708 ipvlan: handle NETDEV_DOWN event
In case of stacked devices, to help propagate the down
link state from the parent/root device (to this leaf device),
handle NETDEV_DOWN event like it is done now for NETDEV_UP.

In the below example, ens5 is the host interface which is the
parent of the ipvlan interface eth0 in the container.

Host:

[root@gkn-podman-x64 ~]# ip link set ens5 down
[root@gkn-podman-x64 ~]# ip -d link show dev ens5
3: ens5: <BROADCAST,MULTICAST> mtu 9000 qdisc mq state DOWN
      ...
[root@gkn-podman-x64 ~]#

Container:

[root@testnode-ol8 /]# ip -d link show dev eth0
2: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 state UNKNOWN
        ...
    ipvlan mode l2 bridge
        ...
[root@testnode-ol8 /]#

eth0's state continues to show up as UP even though ens5 is now DOWN.

For macvlan the handling of NETDEV_DOWN event was added in
commit 80fd2d6ca5 ("macvlan: Change status when lower device goes down").

Reported-by: Gia-Khanh Nguyen <gia-khanh.nguyen@oracle.com>
Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-04-08 13:20:01 +01:00
..
ipvlan_core.c ipvlan: add ipvlan_route_v6_outbound() helper 2023-11-10 10:59:22 +00:00
ipvlan_l3s.c ipvlan: fix bound dev checking for IPv6 l3s mode 2023-06-12 09:34:01 +01:00
ipvlan_main.c ipvlan: handle NETDEV_DOWN event 2024-04-08 13:20:01 +01:00
ipvlan.h ipvlan: hold lower dev to avoid possible use-after-free 2022-11-18 10:39:22 +00:00
ipvtap.c net: fill in MODULE_DESCRIPTION()s for ipvtap 2024-02-09 14:12:02 -08:00
Makefile