Re: [PATCH] NFS4: fix referrals with IPv6 mounts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 20, 2012, at 3:45 PM, Jim Rees wrote:

> Weston Andros Adamson wrote:
> 
>  nfs4_path() was parsing the path component by splitting on the first colon.
>  This is wrong when an IPv6 address is used to mount a server.
> 
>  For example, having mounted 'fc00::10:/export', nfs4_path() returned
>  ':10:/export'.  This causes referrals (using IPv4 or IPv6 addresses) to fail
>  in nfs4_validate_fspath().
> 
>  Parsing the path component by using the *last* colon works with
>  IPv6 as well as IPv4 addrs.
> 
> What if your mount is:
> 
> server.edu:/export/:I-like-colons:
> 
> It seems to me something has to give.  Either we require v6 addresses be
> enclosed in [], export dirs start with "/", or exports have no ":".


Yeah, you're right.

Although IPv6 addrs must be enclosed in [] to work with mount, it's always displayed in the kernel without the [].

I suppose the correct fix is to always display IPv6 addresses enclosed in [], which might touch a *lot* of places.

Thoughts?  I'll wait for others to chime in before I go fixing this. I have a set of nfsd and mountd patches that deal with similar issues on the server side.  I'll clean those up and submit them before getting back to this.

Who the hell thought it was a good idea for IPv6 to use ':' as a delimiter!?  Is it paranoid to think they designed it that way to make our lives harder? ;)

-dros

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux