netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Haley <brian.haley@hp.com>
To: "Aurélien Charbon" <aurelien.charbon@ext.bull.net>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	netdev ML <netdev@vger.kernel.org>,
	Mailing list NFSv4 <nfsv4@linux-nfs.org>
Subject: Re: [PATCH] IPv6 support for NFS server
Date: Thu, 17 Jan 2008 12:17:58 -0500	[thread overview]
Message-ID: <478F8DC6.9030105@hp.com> (raw)
In-Reply-To: <478F8AA3.9060707@ext.bull.net>

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

  reply	other threads:[~2008-01-17 17:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10 18:34 [PATCH] IPv6 support for NFS server Aurélien Charbon
2007-12-10 18:34 ` J. Bruce Fields
2007-12-11 16:46   ` Aurélien Charbon
2007-12-11 16:41 ` Brian Haley
2007-12-11 18:00   ` Aurélien Charbon
2007-12-11 18:19     ` YOSHIFUJI Hideaki / 吉藤英明
2008-01-15 22:32     ` J. Bruce Fields
2008-01-15 23:16       ` J. Bruce Fields
2008-01-17 17:04         ` Aurélien Charbon
2008-01-17 17:17           ` Brian Haley [this message]
2008-01-17 20:38           ` J. Bruce Fields
2008-01-18 14:50             ` Aurélien Charbon
2008-01-18 22:55               ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=478F8DC6.9030105@hp.com \
    --to=brian.haley@hp.com \
    --cc=aurelien.charbon@ext.bull.net \
    --cc=bfields@fieldses.org \
    --cc=netdev@vger.kernel.org \
    --cc=nfsv4@linux-nfs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).