All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: [Devel] [PATCH DRAFT vz10 3/5] ve/net/ip6_gre: Mark ip6gretap devices as movable into a Container
Date: Wed, 12 Aug 2026 15:03:59 +0200	[thread overview]
Message-ID: <20260812130401.154702-4-khorenko@virtuozzo.com> (raw)
In-Reply-To: <20260812130401.154702-1-khorenko@virtuozzo.com>

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@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


  parent reply	other threads:[~2026-08-12 13:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 13:03 [Devel] [PATCH DRAFT vz10 0/5] Enable GRE ERSPAN inside Containers Konstantin Khorenko
2026-08-12 13:03 ` [Devel] [PATCH DRAFT vz10 1/5] Revert "ve/net/gre: Disable ERSPAN support in ip_gre module" Konstantin Khorenko
2026-08-12 13:03 ` [Devel] [PATCH DRAFT vz10 2/5] ve/net/gre: Enable ERSPAN support in Containers under VE_FEATURE_ERSPAN Konstantin Khorenko
2026-08-12 13:03 ` Konstantin Khorenko [this message]
2026-08-12 13:04 ` [Devel] [PATCH DRAFT vz10 4/5] ve/net/ip6_gre: Fix NULL deref when creating ip6gre/ip6erspan without VE_FEATURE_IPGRE Konstantin Khorenko
2026-08-12 13:04 ` [Devel] [PATCH DRAFT vz10 5/5] ve/net/ip6_gre: Enable ip6erspan support in Containers under VE_FEATURE_ERSPAN Konstantin Khorenko

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=20260812130401.154702-4-khorenko@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.