WebDAV mount fails over IPv6 using Finder and NetFSMountURLSync (GetServerInfo error 5)

I attempted to mount a WebDAV server on macOS using Finder. The mount was successful when using the server's IPv4 address or hostname, but failed when using its IPv6 address.

I also tested the mount using the NetFS framework API via NetFSMountURLSync. The results were consistent: the mount succeeded with the IPv4 address and hostname but failed when using the IPv6 address.

While observing live logs via Console.app, I saw that the process NetAuthSysAgent produced the following error during the IPv6 mount attempt: GetServerInfo failed with error 5

Have you filed a bug on this and, if so, what is the bug number?

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Hi Kevin, I have raised a bug today and the Bug ID is FB18576024.

GetServerInfo failed with error 5

FYI, this is "EIO", which is used as the generic “catch-all" error in the NetFS plugin system for cases where a more specific/relevant error wasn't appropriate.

Hi Kevin, I have raised a bug today and the Bug ID is FB18576024.

So, I looked into this today and I think there are two different things that may be going on:

  1. There are issues in CFURL around correctly parsing IPv6 addresses and binary compatibility with previously shipped code. I don't think this is the entire problem, but I'm sure it's not helping.

  2. If you're curious, you can look at the code yourself, but the webdav plugin is where the error actually originates and that project has its own URL processing logic built on top of CFURL. That code is quite old and certainly was not designed with IPv6 in mind.

Finally, if this is a critical issue for your product, then I would strongly recommend updating to the bug with as much detail as you can about the problems this is causing and why you need it fixed. One thing to keep in mind here is that filing bugs isn't simply about telling us about issues, it's also about helping us properly prioritize what we're working on. That's particularly important for older components (like webdav) that aren't as widely used as they once were.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Hi, We were successfully able to mount an SMB network share using its IPv6 address. We tried mounting SMB via Finder as well as NetFSMountURLSync and it worked. How is SMB mount working?

Hi, We were successfully able to mount an SMB network share using its IPv6 address. We tried mounting SMB via Finder as well as NetFSMountURLSync and it worked. How is SMB mount working?

The NetFS framework is actually a relatively thin wrapper on top of individual NetFSPlugins written as part of each network file system driver. Case in point, while this log message:

GetServerInfo failed with error 5

...did come from the NetFS framework, the function that actually returned "5" was the WebDAVPlugin implementation of GetServerInfo. That leads back to here:

How is SMB mount working?

I haven't looked at their code in detail, but the high-level answer is that they're totally different code paths. smb's URL structure is more complicated and the smb project is under much more active development, both of which probably helped "avoid" the problem. I will say that some work was done ~15 years to support IPv6 URLs as part of our transition from afp to smb, but that was driven by specialized LAN use cases that never really applied to WebDAV.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

WebDAV mount fails over IPv6 using Finder and NetFSMountURLSync (GetServerInfo error 5)
 
 
Q