| 12 Sep 2025 |
Jassuko | Not weird, really. The .local thingy is intended for host discovery on local network by name. And the hostname is by definition the last part of the fqdn. :p | 14:01:24 |
K900 |
Most computer users neglect to type the trailing dot at the end of a
fully qualified domain name, making it a relative domain name (e.g.,
"www.example.com"). In the event of network outage, attempts to
positively resolve the name as entered will fail, resulting in
application of the search list, including ".local.", if present. A
malicious host could masquerade as "www.example.com." by answering
the resulting Multicast DNS query for "www.example.com.local.". To
avoid this, a host MUST NOT append the search suffix ".local.", if
present, to any relative (partially qualified) host name containing
two or more labels. Appending ".local." to single-label relative
host names is acceptable, since the user should have no expectation
that a single-label host name will resolve as is. However, users who
have both "example.com" and "local" in their search lists should be
aware that if they type "www" into their web browser, it may not be
immediately clear to them whether the page that appears is
"www.example.com" or "www.local".
| 14:01:26 |
magic_rb | Aaaah DNS is cursef | 14:03:19 |
K900 | Technically not really an issue anymore in many ways because browsers ship the public suffix list | 14:03:41 |
K900 | And can consult it and avoid this kind of nonsense | 14:03:47 |
K900 | But it was a concern at the time of writing the RFC and it was never updated since | 14:04:01 |
Jassuko | Public Suffix List is problematic as well. :D | 14:04:39 |
K900 | In other ways, yes | 14:05:02 |
Jassuko | Yeah. It would not need to exist, if the cookie spec was sane.. I think it's just rabbit holes all the way down at this point, lol. :D | 14:05:45 |
toonn | K900: That applies to sub.host but not to sub.host.local, not appending ".local." would still "just work." | 14:06:11 |
K900 | Yes, except you could not know when not to append .local | 14:06:54 |
K900 | Before the PSL existed | 14:06:54 |
toonn | I don't see how subdomains make that more problematic though. Just never append if the hostname has a ".?" | 14:08:39 |
K900 | I mean, you're welcome to propose a spec change if you want this so much | 14:13:43 |
K900 | But as it stands, it is out of spec | 14:13:48 |
toonn | I doubt I can convince anyone, mDNS seems to be rather universally despised. As long as I can get avahi to resolve subdomains for me, I'm happy. | 14:16:00 |
toonn | magic_rb: Maybe I was naively hoping `pack . unpack` avoids reading the entire lazy bytestring into memory. I don't know if I elided the type declaration on purpose or just temporarily because I was changing things, probably the latter. | 14:24:21 |
Jassuko | I would actually like mdns if it didn't have all those weird quirks on the implementations. -_- | 14:26:07 |
toonn | It kinda feels like it was intentionally hamstrung to make it perpetually unpopular. | 14:27:46 |
magic_rb | It does, going from a strict to lazy bytestring always incurs a copy unless the lazy bytestring is only one chunk i think. Then it may be able to do the conversion in place | 14:33:20 |
toonn | magic_rb: I was thinking more that it might be read chunk by chunk, converted to the next however many Word8s and the same thing when packing, with fusion eliminating the intermediate list. | 14:34:55 |
toonn | magic_rb: Also very possible I just didn't notice toStrict though. | 14:35:08 |
magic_rb | https://hackage-content.haskell.org/package/bytestring-0.12.2.0/docs/src/Data.ByteString.Lazy.Internal.html#local-6989586621679118241 reading the impl here, it has a optimization for "just one chunk" | 14:36:13 |
magic_rb | In that narrow case it should be O(1) and since you deal with up to 64 bytes, it should always be O(1) | 14:38:30 |
magic_rb | Yeah the default chunk size is 32k - memory management overhead so your DNS packets fit as such lazy <-> strict is O(1) for you | 14:40:28 |
toonn | Do you have a name on Codeberg? | 14:50:12 |
toonn | For some Co-authored-by attribution ; ) | 14:50:51 |
toonn | magic_rb: ^ | 16:12:49 |
magic_rb | toonn: magic_rb magic_rb@redalder.org | 16:35:28 |
magic_rb | * toonn: magic_rb <magic_rb@redalder.org> | 16:35:34 |