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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 17 Jan 2008 12:17:58 -0500
From:	Brian Haley <brian.haley@...com>
To:	Aurélien Charbon <aurelien.charbon@....bull.net>
Cc:	"J. Bruce Fields" <bfields@...ldses.org>,
	netdev ML <netdev@...r.kernel.org>,
	Mailing list NFSv4 <nfsv4@...ux-nfs.org>
Subject: Re: [PATCH] IPv6 support for NFS server

Aurélien Charbon wrote:
> Thanks for your comments.
> Here is the patch with some cleanups.

Hi Aurelien,

Just two nits.

> --- a/include/net/ipv6.h
> +++ b/include/net/ipv6.h
> @@ -400,6 +400,15 @@ static inline int ipv6_addr_v4mapped(const struct in6_addr *a)
>  		 a->s6_addr32[2] == htonl(0x0000ffff));
>  }
>  
> +static inline void ipv6_addr_set_v4mapped(const __be32 addr,
> +					  struct in6_addr *v4mapped)
> +{
> +	ipv6_addr_set(v4mapped,
> +			0, 0,
> +			htonl(0x0000FFFF),
> +			addr);
> +}

I think Bruce wanted you to put as much on one line here as possible.

> @@ -641,9 +668,24 @@ static int unix_gid_find(uid_t uid, struct group_info **gip,
>  int
>  svcauth_unix_set_client(struct svc_rqst *rqstp)
>  {
> -	struct sockaddr_in *sin = svc_addr_in(rqstp);
> +	struct sockaddr_in *sin;
> +	struct sockaddr_in6 *sin6, sin6_storage;
>  	struct ip_map *ipm;
>  
> +	switch (rqstp->rq_addr.ss_family) {
> +	case AF_INET:
> +		sin = svc_addr_in(rqstp);
> +		sin6 = &sin6_storage;
> +		ipv6_addr_set(&sin6->sin6_addr, 0, 0,
> +				htonl(0x0000FFFF), sin->sin_addr.s_addr);
> +		break;

ipv6_addr_set_v4mapped(sin->sin_addr.s_addr, &sin6->sin6_addr);

-Brian
--
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