Article View: linux.kernel.netdev
Article #1662[PATCH net-next v4 1/3] gtp: set a valid genl command in PDP context get and dump replies
From: Anil Kaushik
Date: Sat, 10 Oct 2026 10:57
Date: Sat, 10 Oct 2026 10:57
42 lines
10066 bytes
10066 bytes
gtp_genl_fill_info() stamps the reply with the command its callers pass
in. gtp_genl_get_pdp() and gtp_genl_dump_pdp() pass nlmsg_type, which in
a genl message is the dynamically assigned family id rather than a
GTP_CMD_* value, so replies to a PDP context get or dump carry a
meaningless command number.
libgtpnl ignores the command and is unaffected, but parsers that check
it (for example the ynl tooling) treat the reply as an unknown command
and discard it. Pass GTP_CMD_GETPDP, as gtp_tunnel_notify() already
passes a real command on the notification path. No uapi change.
Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
Signed-off-by: Anil Kaushik <anilkaushikwireless@gmail.com>
---
drivers/net/gtp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 4aff23bcfdd1..99836b773e5c 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -2279,7 +2279,7 @@ static int gtp_genl_get_pdp(struct sk_buff *skb, struct genl_info *info)
}
err = gtp_genl_fill_info(skb2, NETLINK_CB(skb).portid, info->snd_seq,
- 0, info->nlhdr->nlmsg_type, pctx);
+ 0, GTP_CMD_GETPDP, pctx);
if (err < 0)
goto err_unlock_free;
@@ -2326,7 +2326,7 @@ static int gtp_genl_dump_pdp(struct sk_buff *skb,
NETLINK_CB(cb->skb).portid,
cb->nlh->nlmsg_seq,
NLM_F_MULTI,
- cb->nlh->nlmsg_type, pctx)) {
+ GTP_CMD_GETPDP, pctx)) {
cb->args[0] = i;
cb->args[1] = j;
cb->args[2] = (unsigned long)gtp;
--
2.25.1
Technical Details
Message-ID:
<20261010105740.223992-2-anilkaushikwireless@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344163-linux-kernel-netdev=dewy.ruReferences:
<20261010105740.223992-1-anilkaushikwireless@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344163-linux-kernel-netdev=dewy.ru
From: anilkaushikwireless@gmail.com (Anil Kaushik)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v4 1/3] gtp: set a valid genl command in PDP context get and dump replies
Date: Sat, 10 Oct 2026 10:57:38 +0000
Organization: Usenet Network
Message-ID: <20261010105740.223992-2-anilkaushikwireless@gmail.com>
References: <20261010105740.223992-1-anilkaushikwireless@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1310420"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:vCJUNzBc85dydCvCfXJR/Oj04Oc= sha256:BNBwDCKtdXM76pn0SiJvXbrBv6Z61P7A0lBJ6ImWNV4=
sha1:Us1MlsYVNs/J1nox97rRqTgw65Q= sha256:8myT6hZTTKhSXKp7O+A2fY3Wm5UnBXTIYQzUZBzd3II=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id ACD1510F8C1; Sat, 10 Oct 2026 13:58:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.749
X-Spam-Status: No, score=-0.749 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id xCsxvLeYd4Bv;
Sat, 10 Oct 2026 13:58:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-344163-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 760E910F2A0; Sat, 10 Oct 2026 13:58:43 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by tor.lore.kernel.org (Postfix) with ESMTP id 8D4F82E8F7; Sat, 10 Oct 2026 10:58:02 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 177F440F75C;
Sat, 10 Oct 2026 10:57:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b0ygltE1"
X-Received: from mail-dy1-f172.google.com (mail-dy1-f172.google.com [74.125.82.172])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D496A409295
for <netdev@vger.kernel.org>; Sat, 10 Oct 2026 10:57:54 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.172
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791629878; cv=none; b=piUZeT+vPiIUwWZ0Xa2xsMVm8AgaQfrN7eI/oAleSeHjmDtqRGCHaNc5Y1eT0G/T3gjz/Tv8LTw25mHEWSnsQ59aeUvaP1d3YJBN1Fonnv88zdLxsCJtlp8fH/wh0CV303UyRdI1ajTHhhGRPt/rZd2pubjy6ZVf8HvtR4SCX1U=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791629878; c=relaxed/simple;
bh=3OTy30U9zaA/EoJrB2LEVikw7T9erylLWW9kg7srSqA=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=GEKKGHzo37Xtd8A5nmH/hikqGAhVGVDlV64Y228U61Gc74BOmnnLYiFREOt9ee63npO9jHZfpqLOGF3pAcdOGLjv59to6UScm1I3yzKqafPTiEKjhbFeznN0mKKweN24Jc1cJu3FWGaUvuUiAJtbAeJfPzJHgdnRf4z9uZkd7h0=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=b0ygltE1; arc=none smtp.client-ip=74.125.82.172
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy1-f172.google.com with SMTP id 5a478bee46e88-354ba08cfd1so921906eec.1
for <netdev@vger.kernel.org>; Sat, 10 Oct 2026 03:57:54 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1791629874; x=1792234674; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=uV/uHpIyvSDg1rMqWOrJjW5nbbNl8aiS8yrcLtotir0=;
b=b0ygltE1Y1ZWbF4NPe3ThZemZnbNZwUd/lMTmMxkwUo7FOvDi+Hq392Qx7FpKWaBkB
jolMA7uSnyE62/zfyBLTmLtinIHhAajliGepGkeCe+iZ/GCkdl+Jk5iD1wRriUU9Hvwo
I9Sw/tp0bPC2dACMFkEC+qdklDrMuusmHsemncgrF3CBqIWf2u6uB8Odx8GViGhHrU1f
VSdoSAhz6aLXvaxWTBVit/IeyE6kbytP0+m8yYH+fxSSApQ8Tb/5AmsDpZAjhdwmVPD3
SJJZ7XJKjIZuqR9opsSP4eGt5gso5zR2tZC+vdXU4xy/DyoLRfQYFdUw+GUlosJSpLdL
fltg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1791629874; x=1792234674;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
:to:cc:subject:date:message-id:reply-to:content-type;
bh=uV/uHpIyvSDg1rMqWOrJjW5nbbNl8aiS8yrcLtotir0=;
b=gpg7lCRS/To1YW/znNf91+8WcZ0t1ogzwfL2ZyZ1si/GKDVpTqp04PJR/m9/qKXgwJ
fnRudktAga1tY3PujA+33FA9fKWleMChd/XJW7ex1XGTtnIHH/RzzFLPvfoKKnqhx0y1
DS8iyM1oWulw2UVbdW/fiIV9HMeyAkv3760akcG1TxB6Ebtmxp3w2QRhm1BN8bbFtZSJ
4wbJ8010s0+09hcYVglWvNaC5ju5Hr46hBw9wOlK0qCEprIEBSFIrh8kg+Khg2zQQTNE
KJH9T4SqAdQY/lffkhDBDJIkkU63dSbmfb7hXjYIPf53V2ALbgYoVvSLGnD+0c9j02O6
ybJQ==
X-Forwarded-Encrypted: i=1; AKwUvBzka+9r6VlFyFsW0n+6NHyK4sTL0QEwI3zNvF86oAM2jXrn99cbvxR/8R/IYajSqaSqkSbueEs=@vger.kernel.org
X-Gm-Message-State: AFq9FYJYbstMAKcyE7IPf7Sh2O9r9CF9HGJ3LnajKmAp2QeoJO62uUD7
s5xvaKApu8UGqaFi/2hmOebm3mbeDjxSU2daA9eVm2r6sXqmuK9B4CD1
X-Gm-Gg: AYBFou0jVC0CIutzXbByCNnVzdZqI83l1zHiCnOOkG/rPoNwppQEef2wwh1xrLhb3Jc
OfA9EpqrBRP8KNpfX6nLcgCvzSk+fJ7jWBmnda3rvw28fS3tvEnhT+S95xUkbFHVI62Z7DqWD7s
5+405/cPLtarSomHC81BtsySHXtcN625OMlHhbUlththllqoSR7wbSMw4Eh0FjTnKyrofoJLKFD
yCtOP3/Nrf1A/v3AZIUrK7bSjjKvx/8kCMLQc5OPmuU4eak5TeObyp7tJVuYSQPG8AY7S6+WQe7
2vh+iC3+rf3fbM8EuWiCvJKzJMQPSO47VvfzD3hyQ/0DFmdM0b3+0LfSnqHofV1m+qYUvE15MLr
P3Z9fFqJFxL7M+TiyYxEhRtQbx7I+EhBlx6xX30TYiNJktoog3IvrBnVI75v35mmSTqpl1yFKEx
ST9zxS2nze6HRcJ8+q9ZhGPSxublPMBnmiyQD3PwtLNBfWLp3t8JzF1JxbW6k/fhnxzFOSr87AU
QWAK903uEEIAiNQiHNEP2zANjqNyRvuj29MpyH50zSgldGfWiejnYB0SyU8txZRst4fqi8ermaC
M+YoqOGxAdq1ADlM6wi/rfYAzt+y+GJX+1WuedD7tdWMZf6xkYW1Qw==
X-Received: by 2002:a05:7301:dd83:b0:358:ae07:138e with SMTP id 5a478bee46e88-358ae071798mr1145061eec.8.1791629873704;
Sat, 10 Oct 2026 03:57:53 -0700 (PDT)
X-Received: from ramen-dev-security-2.asia-south1-c.c.ramen-dev-345017.internal (90.156.200.35.bc.googleusercontent.com. [35.200.156.90])
by smtp.gmail.com with ESMTPSA id 5a478bee46e88-353810403e9sm13577784eec.2.2026.10.10.03.57.48
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 10 Oct 2026 03:57:53 -0700 (PDT)
X-Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Shuah Khan <shuah@kernel.org>,
osmocom-net-gprs@lists.osmocom.org,
netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Anil Kaushik <anilkaushikwireless@gmail.com>
X-Mailer: git-send-email 2.25.1
X-In-Reply-To: <20261010105740.223992-1-anilkaushikwireless@gmail.com>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>