[Devel] [PATCH DRAFT vz10 3/5] ve/net/ip6_gre: Mark ip6gretap devices as movable into a Container

Konstantin Khorenko khorenko at virtuozzo.com
Wed Aug 12 16:03:59 MSK 2026


Commit 85f1620c362c ("ve/net/ipv6 tunnels: Enable GRE netdevice register
inside container") added NETIF_F_VIRTUAL to ip6gre_tunnel_setup() so that
the base ip6gre device can be registered inside a non-super VE, but it
missed ip6gre_tap_setup(). As a result, even with VE_FEATURE_IPGRE
enabled, a Container could not create an ip6gretap device:
register_netdevice() rejected it with -EPERM in ve_is_dev_movable().

Set NETIF_F_VIRTUAL for ip6gretap devices as well, matching ip6gre and
the IPv4 gretap path.

Fixes: 85f1620c362c ("ve/net/ipv6 tunnels: Enable GRE netdevice register inside container")
https://virtuozzo.atlassian.net/browse/VSTOR-141173

Feature: net: whitelist allowed Container network devices
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 net/ipv6/ip6_gre.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index be6c7d0672933..ba32cc39fc882 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -1960,6 +1960,9 @@ static void ip6gre_tap_setup(struct net_device *dev)
 	dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
 	dev->priv_flags &= ~IFF_TX_SKB_SHARING;
 	dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+#ifdef CONFIG_VE
+	dev->ve_features = NETIF_F_VIRTUAL;
+#endif
 	netif_keep_dst(dev);
 }
 
-- 
2.43.0



More information about the Devel mailing list