Hacker News new | past | comments | ask | show | jobs | submit login

Wtf! I've never known that!

Of course I have anyone connecting to SMB://fileserver to make it convenient and stable across router reboots.

I didn't expect naming it to be an issue.




I think the Finder — or discoveryd underneath — is doing some kind of non-cached(!) WINS name lookup for each fopen(2) syscall against SMB shares mounted through their WINS name.

If your SMB server is running Linux, IIRC (this was ~8 years ago, so this might no longer be true) that it also seemed to work, to run avahi on the Linux host, configured to announce the system the way you would if you were setting up AFP on the host; and to have avahi then announce SMB as a service (mDNS SRV record) for the system.

I'd recommend trying to find an old guide for setting up a Linux AFP server. You don't actually have to set up (or even install) AFP, though; just do all the avahi parts!

Why does this work? I think it's because, unlike for the WINS names underlying SMB, macOS seems to have an optimized and cached name-lookup path within discoveryd for the mDNS SRV records that would underlie AFP shares. And this code-path seems to be perfectly happy with discovering an SMB share via mDNS. (Probably because of some legacy transition Apple went through internally, where AFP shares were deprecated + replaced with SMB shares, while still being published "as if they were" AFP shares, via mDNS.)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: