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]
Date:	Fri, 13 Mar 2015 15:48:08 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Eric Dumazet <edumazet@...gle.com>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 3/3] inet_diag: factorize code in new
 inet_diag_msg_common_fill() helper

On Fri, 2015-03-13 at 13:19 -0700, Eric Dumazet wrote:
> Now the three type of sockets share a common base, we can factorize
> code in inet_diag_msg_common_fill().
> 
> inet_diag_entry no longer requires saddr_storage & daddr_storage
> and the extra copies.
> 
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
>  net/ipv4/inet_diag.c | 149 +++++++++++++++++----------------------------------
>  1 file changed, 48 insertions(+), 101 deletions(-)
> 
> diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
> index d827fe2e3ce0..abf5e75d0a75 100644
> --- a/net/ipv4/inet_diag.c
> +++ b/net/ipv4/inet_diag.c
> @@ -44,10 +44,6 @@ struct inet_diag_entry {
>  	u16 dport;
>  	u16 family;
>  	u16 userlocks;
> -#if IS_ENABLED(CONFIG_IPV6)
> -	struct in6_addr saddr_storage;	/* for IPv4-mapped-IPv6 addresses */
> -	struct in6_addr daddr_storage;	/* for IPv4-mapped-IPv6 addresses */
> -#endif
>  };
>  
>  static DEFINE_MUTEX(inet_diag_table_mutex);
> @@ -70,6 +66,31 @@ static void inet_diag_unlock_handler(const struct inet_diag_handler *handler)
>  	mutex_unlock(&inet_diag_table_mutex);
>  }
>  
> +static void inet_diag_msg_common_fill(struct inet_diag_msg *r,
> +				      const struct sock *sk)

Arg this const qualifier needs to be removed

Will send a v2, sorry.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ