You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
net.LookupPort(), net.LookupCNAME(), and net.LookupAddr() all wind up trying to decide whether to use cgo lookups or the pure Go lookups by calling hostLookupOrder("") (via canUseCgo()). Because the empty string contains no dots, it matches the 'nsswitch.conf hosts line contains myhostname and hostname to be looked up contains no dots' check that forces the use of cgo. I suspect that this is unintentional, as at least the port lookup isn't a hostname related one and so won't actually use the myhostname NSS module.
(It may be necessary for LookupCNAME() to care about myhostname here, unlike at least port lookup.)
The text was updated successfully, but these errors were encountered:
I don't, and I suspect that few or no people do. People may call LookupAddr() more frequently, though; I do have a daemon that calls LookupAddr() on every connection. Although people who care that much can always force the pure Go resolver to be used.
net.LookupPort(), net.LookupCNAME(), and net.LookupAddr() all wind up trying to decide whether to use cgo lookups or the pure Go lookups by calling hostLookupOrder("") (via canUseCgo()). Because the empty string contains no dots, it matches the 'nsswitch.conf hosts line contains myhostname and hostname to be looked up contains no dots' check that forces the use of cgo. I suspect that this is unintentional, as at least the port lookup isn't a hostname related one and so won't actually use the myhostname NSS module.
(It may be necessary for LookupCNAME() to care about myhostname here, unlike at least port lookup.)
The text was updated successfully, but these errors were encountered: