Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net] gtp: add GTPA_LINK info to msg sent to userspace
@ 2020-08-25 12:59 Nicolas Dichtel
2020-08-25 13:29 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Dichtel @ 2020-08-25 12:59 UTC (permalink / raw)
To: davem, kuba, pablo, laforge, osmocom-net-gprs
Cc: netdev, Nicolas Dichtel, Gabriel Ganne
During a dump, this attribute is essential, it enables the userspace to
know on which interface the context is linked to.
Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Gabriel Ganne <gabriel.ganne@6wind.com>
---
I target this to net, because I think this is a bug fix. The dump result cannot
be used if there is more than one gtp interface on the system.
drivers/net/gtp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 21640a035d7d..8e47d0112e5d 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -1179,6 +1179,7 @@ static int gtp_genl_fill_info(struct sk_buff *skb, u32 snd_portid, u32 snd_seq,
goto nlmsg_failure;
if (nla_put_u32(skb, GTPA_VERSION, pctx->gtp_version) ||
+ nla_put_u32(skb, GTPA_LINK, pctx->dev->ifindex) ||
nla_put_be32(skb, GTPA_PEER_ADDRESS, pctx->peer_addr_ip4.s_addr) ||
nla_put_be32(skb, GTPA_MS_ADDRESS, pctx->ms_addr_ip4.s_addr))
goto nla_put_failure;
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] gtp: add GTPA_LINK info to msg sent to userspace
2020-08-25 12:59 [PATCH net] gtp: add GTPA_LINK info to msg sent to userspace Nicolas Dichtel
@ 2020-08-25 13:29 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-08-25 13:29 UTC (permalink / raw)
To: nicolas.dichtel
Cc: kuba, pablo, laforge, osmocom-net-gprs, netdev, gabriel.ganne
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Tue, 25 Aug 2020 14:59:40 +0200
> During a dump, this attribute is essential, it enables the userspace to
> know on which interface the context is linked to.
>
> Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Tested-by: Gabriel Ganne <gabriel.ganne@6wind.com>
Applied and queued up for -stable, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-25 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 12:59 [PATCH net] gtp: add GTPA_LINK info to msg sent to userspace Nicolas Dichtel
2020-08-25 13:29 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).