Federation client shouldn't follow CNAME records in SRV records
RFC2782 forbids CNAME records as SRV record targets but we need to check it because Go completely ignores that
this turns out to be surprisingly hard to do correctly in Go, so I'm not sure this is worth fixing. It's pretty harmless if we are a bit too tolerant.
I know it forbids it, but everytime a server lets me specify a CNAME nonetheless, I dance a happy dance. Even if not accordingly strictly to spec, it is not wrong to be a bit lenient, so I propose to not do anything about this and close the issue :-)
I fundamentally disagree with past-me here.
Given the question "should CNAMEs be accepted as the target of SRV records", there should be one answer that applies to the whole of the matrix ecosystem, otherwise we'll be in the frustrating situation of connections working intermittently. (eg, you'll be able to federate with servers written in Go, but not in Python)
Before completely deciding what to do here, I'd be interested to know what Synapse does, but given, as Brendan says, CNAMEs are not normally valid as the target of SRV records, I am inclined to say they should not be accepted.
Related: https://github.com/matrix-org/matrix-spec/issues/606