Skip to content

Commit

Permalink
gtp: add GTPA_LINK info to msg sent to userspace
Browse files Browse the repository at this point in the history
During a dump, this attribute is essential, it enables the userspace to
know on which interface the context is linked to.

Fixes: 459aa66 ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
Signed-off-by: Nicolas Dichtel <[email protected]>
Tested-by: Gabriel Ganne <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
NicolasDichtel authored and davem330 committed Aug 25, 2020
1 parent 99408c4 commit b274e47
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/gtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b274e47

Please sign in to comment.