From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: linux-next: nfs build failure
Date: Wed, 18 Jun 2008 16:14:02 -0400 [thread overview]
Message-ID: <1213820042.8233.21.camel@localhost> (raw)
In-Reply-To: <20080618125213.30382b62.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
On Wed, 2008-06-18 at 12:52 +1000, Stephen Rothwell wrote:
> Hi Trond,
>
> Today's linux-next build (powerpc ppc64_defconfig) failed like this:
>
> fs/built-in.o: In function `.nfs_parse_ip_address':
> super.c:(.text+0xe2f08): undefined reference to `.__ipv6_addr_type'
>
> Some CONFIG_IPV6 protections are needed ...
>
> I reverted commit 09491a874d4f9a8676567bc58bce9dec9539740d ("NFS: handle
> interface identifiers in incoming IPv6 addresses").
I suggest something like the attached patch. Comments Chuck?
Trond
[-- Attachment #2: linux-2.6.26-023-dont_parse_ipv6_if_no_config_ipv6.dif --]
[-- Type: message/rfc822, Size: 3160 bytes --]
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: NFS: Don't allow IPv6 addresses if CONFIG_IPv6 isn't set
Date: Wed, 18 Jun 2008 16:04:22 -0400
Message-ID: <1213820042.8233.22.camel@localhost>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1: Type: text/plain, Size: 2148 bytes --]
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: NFS: Don't allow IPv6 addresses if CONFIG_IPv6 isn't set
Date: Wed, 18 Jun 2008 16:04:22 -0400
Message-ID: <1213820042.8233.22.camel@localhost>
Fixes a compile failure in fs/nfs/super.c
Also fix the compiler warnings:
fs/nfs/super.c:721: warning: field width should have type ‘int’, but
argument 2 has type ‘size_t’
fs/nfs/super.c:809:3: warning: returning void-valued expression
fs/nfs/super.c:811:3: warning: returning void-valued expression
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
fs/nfs/super.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index e62820c..6a47bc3 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -718,10 +718,10 @@ static void nfs_parse_ipv4_address(char *string, size_t str_len,
struct sockaddr_in *sin = (struct sockaddr_in *)sap;
u8 *addr = (u8 *)&sin->sin_addr.s_addr;
- dfprintk(MOUNT, "NFS: parsing IPv4 address %*s\n",
- str_len, string);
-
if (str_len <= INET_ADDRSTRLEN) {
+ dfprintk(MOUNT, "NFS: parsing IPv4 address %*s\n",
+ (int)str_len, string);
+
sin->sin_family = AF_INET;
*addr_len = sizeof(*sin);
if (in4_pton(string, str_len, addr, '\0', NULL))
@@ -732,6 +732,7 @@ static void nfs_parse_ipv4_address(char *string, size_t str_len,
*addr_len = 0;
}
+#ifdef CONFIG_IPV6
static void nfs_parse_ipv6_scope_id(const char *string, const size_t str_len,
const char *delim,
struct sockaddr_in6 *sin6)
@@ -787,6 +788,14 @@ static void nfs_parse_ipv6_address(char *string, size_t str_len,
sap->sa_family = AF_UNSPEC;
*addr_len = 0;
}
+#else
+static void nfs_parse_ipv6_address(char *string, size_t str_len,
+ struct sockaddr *sap, size_t *addr_len)
+{
+ sap->sa_family = AF_UNSPEC;
+ *addr_len = 0;
+}
+#endif
/*
* Construct a sockaddr based on the contents of a string that contains
@@ -806,9 +815,9 @@ static void nfs_parse_ip_address(char *string, size_t str_len,
colons++;
if (colons >= 2)
- return nfs_parse_ipv6_address(string, str_len, sap, addr_len);
+ nfs_parse_ipv6_address(string, str_len, sap, addr_len);
else
- return nfs_parse_ipv4_address(string, str_len, sap, addr_len);
+ nfs_parse_ipv4_address(string, str_len, sap, addr_len);
}
/*
next prev parent reply other threads:[~2008-06-18 20:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 2:52 linux-next: nfs build failure Stephen Rothwell
2008-06-18 20:14 ` Trond Myklebust [this message]
2008-06-18 20:37 ` Chuck Lever
2008-06-18 21:15 ` Trond Myklebust
2008-06-18 21:19 ` Randy Dunlap
2008-06-18 22:18 ` Trond Myklebust
-- strict thread matches above, loose matches on Subject: below --
2008-06-17 9:26 Stephen Rothwell
2008-06-17 20:19 ` Trond Myklebust
2008-06-17 20:37 ` Jeff Layton
2008-06-18 0:49 ` Stephen Rothwell
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=1213820042.8233.21.camel@localhost \
--to=trond.myklebust@fys.uio.no \
--cc=chuck.lever@oracle.com \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).