LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Applying the Linux CIFS Client IPv6 Name Resolution Patch (https://www.linuxquestions.org/questions/linux-server-73/applying-the-linux-cifs-client-ipv6-name-resolution-patch-694036/)

jim0112 12-31-2008 05:44 AM

Applying the Linux CIFS Client IPv6 Name Resolution Patch
 
A patch is available to enable IPv6 name resolution when mounting a share:

http://www.ipv6consultancy.com/ipv6blog/?p=32

However I'm not sure what this patch should be applied to! What source do I need?

I have posted a comment on the original blog page but thought that someone might have already applied this patch.

Thanks!

tdetre 12-31-2008 12:30 PM

Are you sure that patch hasn't already been applied to the latest kernels? You can try changing your entire system to try and use ipv6 address first by adding 'options inet6' to your /etc/resolv.conf. Becareful with this though, I've seen it break some perl apps that aren't ipv6 friendly.

jim0112 01-01-2009 09:14 AM

After a couple of other quick tests it looks like it's not just name resolution that is the problem - I can't use the IPv6 address in /etc/fstab either.

If I use //<ipv6_address>/data as the server & share, I get this:

# mount -v /mnt/fs01data/
parsing options: rw,credentials=/home/jim/.smb
mount error: could not find target server. TCP name <ipv6_address>/data not found
No ip address specified and hostname not found

I get the same error trying to use <hostname>/data.

If I add options inet6 to /etc/resolv.conf the error doesn't change when using the ipv6 address as the servername.

Bizarrely though, if I change back to using the hostname it thinks it has resolved it to another ipv4 address:

# mount -v /mnt/fs01data/
parsing options: rw,credentials=/home/jim/.smb

mount.cifs kernel mount options unc=//<hostname>\data,ip=32.1.4.112,user=user,pass=pass,ver=1,rw,credentials=/home/jim/.smb

I'm not sure where it is getting this IP from, as it isn't anything to do with me:

OrgName: AT&T Global Network Services
OrgID: ATGS
Address: 3200 Lake Emma Road
City: Lake Mary
StateProv: FL
PostalCode: 32746
Country: US

My kernel version: 2.6.27-9-server

I am able to resolve the IPv6 address for the server using dig, ping it successfully, etc.

So it looks as though patching might still be required? I have found another link with the same patch that has some more information:

http://www.nabble.com/-PATCH--mount....d20424645.html

"The current name resolution scheme in mount.cifs is IPv4 only. Expand
it to be protocol-independent. Also take advantage of the fact that
getaddrinfo() returns a list of addresses and have mount.cifs try each
in turn until it hits one that's reachable and allows the socket to
connect."


All times are GMT -5. The time now is 12:19 PM.