summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2020-08-25 14:59:40 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-09 19:03:09 +0200
commitc05e296d77100102cf958a9ac65c556259cf53d5 (patch)
tree88fe8ad8db981b10bbc13cba21f65fc6215329b8
parentb879326610bb45707f384d4a0eae4f819fb7cf2a (diff)
downloadlinux-c05e296d77100102cf958a9ac65c556259cf53d5.tar.gz
linux-c05e296d77100102cf958a9ac65c556259cf53d5.tar.bz2
linux-c05e296d77100102cf958a9ac65c556259cf53d5.zip
gtp: add GTPA_LINK info to msg sent to userspace
[ Upstream commit b274e47d9e3f4dcd4ad4028a316ec22dc4533ac7 ] 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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/gtp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 090607e725a2..d3ccd6929579 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -1187,6 +1187,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;