lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <X8inaGuheZmfN1aG@azazel.net>
Date:   Thu, 3 Dec 2020 08:52:56 +0000
From:   Jeremy Sowden <jeremy@...zel.net>
To:     Jonas Bonn <jonas@...rbonn.se>
Cc:     netdev@...r.kernel.org, pablo@...filter.org, laforge@...monks.org
Subject: Re: [PATCH 2/5] gtp: include role in link info

On 2020-12-02, at 13:33:42 +0100, Jonas Bonn wrote:
> 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: Jonas Bonn <jonas@...rbonn.se>
> ---
>  drivers/net/gtp.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
> index 5a048f050a9c..096aaf1c867e 100644
> --- a/drivers/net/gtp.c
> +++ b/drivers/net/gtp.c
> @@ -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)
>  {
> -	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 */

You have a '+' at the end of l.781 and another at the beginning of
l.782.

>  }
>
>  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))
>  		goto nla_put_failure;
> +	if (nla_put_u32(skb, IFLA_GTP_ROLE, gtp->role))
> +		goto nla_put_failure;
>
>  	return 0;
>
> --
> 2.27.0
>
>

J.

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ