All of lore.kernel.org
 help / color / mirror / Atom feed
From: Le Rouzic <aime.le-rouzic@bull.net>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Varun Chandramohan <varunc@linux.vnet.ibm.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: NFSD IPv6 support for 2.6.29
Date: Mon, 17 Nov 2008 18:52:05 +0100	[thread overview]
Message-ID: <4921AF45.4070009@bull.net> (raw)
In-Reply-To: <2BF8FCDB-0C6D-430E-B2AE-4C293E30A1AE@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]

Chuck Lever a écrit :

>>> On Nov 10, 2008, at 12:15 AM, Varun Chandramohan wrote:
>>>
>>>> Chuck Lever wrote:
>>>>
>>>>> Hi Aime, Varun-
>>>>>
>>>>> Bruce asked me to collect server-side IPv6 patches for upstream.
>>>>> I've collected the patches that have been posted on the list, and
>>>>> added some fixes of my own.
>>>>>
>>>>> Can you have a look at
>>>>>
>>>>> http://git.linux-nfs.org/?p=cel/cel-2.6.git;a=summary
>>>>>
>>>>> tag cel-ipv6-10292008
>>>>>
>>>>> These have been build tested, but I haven't done any run-time
>>>>> testing yet.
>>>>>
>>>>> -- 
>>>>> Chuck Lever
>>>>> chuck[dot]lever[at]oracle[dot]com
>>>>
>>>>
>>>> Hi Chuck,
>>>>
>>>>               I just realized that i forgot to update you about the
>>>> test result of your tree. I found NFSv4 over ipv6 working well. So
>>>> it can be pulled into the mainline soon.
>>>
 Hi
I have tested the "tag cel-ipv6-10292008" and some robustness tests
started simultaneously (connectathon, fsx, iozone, fss_stress, ffsb) have
been running fine during several hours in IPV6 and IPV4.
I used the my nfs-utils package based on nfs-utils.1.1.2 
(http://nfsv4.bullopensource.org/)

Nevertheless I may have missed something during the last mails about IPV6
but I don't find in your tree changes about IPV6 in fs/nfsd/nfsctl.c

I join the patch I submitted for that.

Best Regards


-- 
-----------------------------------------------------------------
Company : Bull, Architect of an Open World TM (www.bull.com)
Name    : Aime Le Rouzic 
Mail    : Bull - BP 208 - 38432 Echirolles Cedex - France
E-Mail  : aime.le-rouzic@bull.net
Phone   : 33 (4) 76.29.75.51
Fax     : 33 (4) 76.29.75.18
----------------------------------------------------------------- 


[-- Attachment #2: patch_ipv6overrpcbindv4_nfsctl --]
[-- Type: text/plain, Size: 2617 bytes --]


 NFSV4 IPV6: Adds AF_INET6 domain processing when AF_INET processing only available in nfsd/nfsctl.c

 ---

 fs/nfsd/nfsctl.c     |   41 +++++++++++++++++++++++++++++++----------

 Signed-off-by: Aime Le Rouzic <aime.le-rouzic@bull.net>
---
diff -Nru rpcbindv4/fs/nfsd/nfsctl.c ipv6overrpcbindv4/fs/nfsd/nfsctl.c
--- rpcbindv4/fs/nfsd/nfsctl.c	2008-09-15 14:50:09.000000000 +0200
+++ ipv6overrpcbindv4/fs/nfsd/nfsctl.c	2008-09-15 15:18:24.000000000 +0200
@@ -230,6 +230,7 @@
 {
 	struct nfsctl_fsparm *data;
 	struct sockaddr_in *sin;
+	struct sockaddr_in6 *sin6;
 	struct auth_domain *clp;
 	int err = 0;
 	struct knfsd_fh *res;
@@ -239,9 +240,19 @@
 		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_INET:
+		sin = (struct sockaddr_in *)&data->gd_addr;
+		ipv6_addr_set_v4mapped(sin->sin_addr.s_addr, &in6);
+		break;
+	case AF_INET6:
+		sin6 = (struct sockaddr_in6 *)&data->gd_addr;
+		ipv6_addr_copy(&in6, &sin6->sin6_addr); 
+		break;
+	default:
 		goto out;
-	sin = (struct sockaddr_in *)&data->gd_addr;
+	}
+
 	if (data->gd_maxlen > NFS3_FHSIZE)
 		data->gd_maxlen = NFS3_FHSIZE;
 
@@ -249,8 +260,6 @@
 
 	exp_readlock();
 
-	ipv6_addr_set_v4mapped(sin->sin_addr.s_addr, &in6);
-
 	clp = auth_unix_lookup(&in6);
 	if (!clp)
 		err = -EPERM;
@@ -269,6 +278,7 @@
 {
 	struct nfsctl_fdparm *data;
 	struct sockaddr_in *sin;
+	struct sockaddr_in6 *sin6;
 	struct auth_domain *clp;
 	int err = 0;
 	struct knfsd_fh fh;
@@ -279,20 +289,31 @@
 		return -EINVAL;
 	data = (struct nfsctl_fdparm*)buf;
 	err = -EPROTONOSUPPORT;
-	if (data->gd_addr.sa_family != AF_INET)
+	if (data->gd_addr.sa_family != AF_INET &&
+	    data->gd_addr.sa_family != AF_INET6)
 		goto out;
+
 	err = -EINVAL;
 	if (data->gd_version < 2 || data->gd_version > NFSSVC_MAXVERS)
 		goto out;
 
 	res = buf;
-	sin = (struct sockaddr_in *)&data->gd_addr;
 	exp_readlock();
 
-	ipv6_addr_set_v4mapped(sin->sin_addr.s_addr, &in6);
+	switch (data->gd_addr.sa_family) {
+	case AF_INET:
+		sin = (struct sockaddr_in *)&data->gd_addr;
+		ipv6_addr_set_v4mapped(sin->sin_addr.s_addr, &in6);
+		break;
+	case AF_INET6:
+		sin6 = (struct sockaddr_in6 *)&data->gd_addr;
+		ipv6_addr_copy(&in6, &sin6->sin6_addr);
+		break;
+	default:
+		goto out;
+	}
 
-	clp = auth_unix_lookup(&in6);
-	if (!clp)
+	if (!(clp = auth_unix_lookup(&in6)))
 		err = -EPERM;
 	else {
 		err = exp_rootfh(clp, data->gd_path, &fh, NFS_FHSIZE);
@@ -305,7 +326,7 @@
 		memcpy(res, &fh.fh_base, fh.fh_size);
 		err = NFS_FHSIZE;
 	}
- out:
+out:
 	return err;
 }

  reply	other threads:[~2008-11-17 17:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 17:04 NFSD IPv6 support for 2.6.29 Chuck Lever
2008-10-30  3:09 ` Varun Chandramohan
2008-11-10  5:15 ` Varun Chandramohan
2008-11-12  5:57   ` Chuck Lever
2008-11-12 16:02     ` Le Rouzic
2008-11-12 16:20       ` Chuck Lever
2008-11-17 17:52         ` Le Rouzic [this message]
2008-11-17 18:19           ` Chuck Lever
2008-12-09 12:37             ` Le Rouzic
2008-12-09 16:24               ` Chuck Lever
2008-12-09 21:04                 ` J. Bruce Fields
2008-12-10 14:48                   ` Le Rouzic
2008-12-10 15:04                     ` Trond Myklebust
     [not found]                       ` <1228921485.2914.14.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-12-10 16:37                         ` 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=4921AF45.4070009@bull.net \
    --to=aime.le-rouzic@bull.net \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=varunc@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.