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: Mailing list NFSv4 <nfsv4@linux-nfs.org>,
	netdev ML <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/2] NFS: handle IPv6 addresses in nfs ctl
Date: Wed, 24 Oct 2007 15:22:27 -0400	[thread overview]
Message-ID: <471F9B73.4010908@hp.com> (raw)
In-Reply-To: <471C893F.6000306@ext.bull.net>

Hi Aurelien,

Again, a few more comments.

I might just modify these in my own tree and send out a patch that 
combines both into one, it might be less work.

> @@ -229,9 +229,20 @@ static ssize_t write_getfs(struct file *
>  		return -EINVAL;
>  	data = (struct nfsctl_fsparm*)buf;
>  	err = -EPROTONOSUPPORT;
> -	if (data->gd_addr.sa_family != AF_INET)
> +	switch (data->gd_addr.sa_family) {
> +	case AF_INET6:
> +		sin6 = &sin6_storage;

This should be:

	in6 = &sin6_storage;

> +		sin6 = (struct sockaddr_in6 *)&data->gd_addr;
> +		ipv6_addr_copy(&in6, &(sin6->sin6_addr)); 

Extra () here.

> -    	if (!(clp = auth_unix_lookup(in6))) 
> +	switch (data->gd_addr.sa_family) {
> +	case AF_INET:
> +		/* IPv6 address mapping */
> +		ipv6_addr_set(&in6, 0, 0, htonl(0x0000FFFF), ((struct sockaddr_in *)&data->gd_addr)->sin_addr.s_addr);
> +		break;
> +	case AF_INET6:
> +		sin6 = &sin6_storage;

This should be:

	in6 = &sin6_storage;

> +		sin6 = (struct sockaddr_in6 *)&data->gd_addr;
> +		ipv6_addr_copy(&in6, &(sin6->sin6_addr));

Extra () here.

-Brian

  reply	other threads:[~2007-10-24 19:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22 11:27 [PATCH 2/2] NFS: handle IPv6 addresses in nfs ctl Aurélien Charbon
2007-10-24 19:22 ` Brian Haley [this message]
2007-10-29 19:16   ` Brian Haley
2007-10-30  4:35 ` Neil Brown
2007-11-05 15:17   ` Aurélien Charbon
  -- strict thread matches above, loose matches on Subject: below --
2007-10-30 17:06 Aurélien Charbon
2007-10-30 19:08 ` Brian Haley
2007-10-31  9:06   ` Aurélien Charbon
2007-10-31 16:20     ` J. Bruce Fields
2007-10-12  9:14 Aurélien Charbon
2007-10-12 16:07 ` Brian Haley

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=471F9B73.4010908@hp.com \
    --to=brian.haley@hp.com \
    --cc=aurelien.charbon@ext.bull.net \
    --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).