Commit e1b2914e authored by Jonas Bonn's avatar Jonas Bonn Committed by Jakub Kicinski

gtp: include role in link info

Querying link info for the GTP interface doesn't reveal in which "role" the
device is set to operate.  Include this information in the info query
result.
Signed-off-by: default avatarJonas Bonn <jonas@norrbonn.se>
Acked-by: default avatarHarald Welte <laforge@gnumonks.org>
Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e21eb3a0
...@@ -728,7 +728,8 @@ static int gtp_validate(struct nlattr *tb[], struct nlattr *data[], ...@@ -728,7 +728,8 @@ static int gtp_validate(struct nlattr *tb[], struct nlattr *data[],
static size_t gtp_get_size(const struct net_device *dev) static size_t gtp_get_size(const struct net_device *dev)
{ {
return nla_total_size(sizeof(__u32)); /* IFLA_GTP_PDP_HASHSIZE */ return nla_total_size(sizeof(__u32)) + /* IFLA_GTP_PDP_HASHSIZE */
nla_total_size(sizeof(__u32)); /* IFLA_GTP_ROLE */
} }
static int gtp_fill_info(struct sk_buff *skb, const struct net_device *dev) static int gtp_fill_info(struct sk_buff *skb, const struct net_device *dev)
...@@ -737,6 +738,8 @@ static int gtp_fill_info(struct sk_buff *skb, const struct net_device *dev) ...@@ -737,6 +738,8 @@ static int gtp_fill_info(struct sk_buff *skb, const struct net_device *dev)
if (nla_put_u32(skb, IFLA_GTP_PDP_HASHSIZE, gtp->hash_size)) if (nla_put_u32(skb, IFLA_GTP_PDP_HASHSIZE, gtp->hash_size))
goto nla_put_failure; goto nla_put_failure;
if (nla_put_u32(skb, IFLA_GTP_ROLE, gtp->role))
goto nla_put_failure;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment