Live data from Hacker News

What came first: the CNAME or the A record?

blog.cloudflare.com

121–130 of 170 posts

Re: What came first: the CNAME or the A record?

#121
everything about this reads like an excuse from a team that doesnt want to admit they screwed up

nitpicking at the RFCs when everyone knows DNS is a big old thing with lots going on

how do they not have basic integration tests to check how clients resolve

it seems very unlike cloudflare of old that was much more up front - there is no talk of the need to improve process, just blaming other people

Re: What came first: the CNAME or the A record?

#122
I've always found it weird that CNAMEs get resolved and lumped into the answer section in the first place. While helpful, this is not what you asked for and it makes much more sense to me to stick that in additional section instead.

As an aside, I am super annoyed at Cloudflare for calling their proxy records "CNAME" in their UI. Those are nothing like CNAMEs and have caused endless confusion.

Re: What came first: the CNAME or the A record?

#123

I am very petty about this one bug and have a very old axe to grind that this reminded me of! Way back in 2011 CloudFlare launched an incredibly poorly researched feature to just return CNAME records at a domain apex ... RFCs be damned. https://blog.cloudflare.com/zone-apex-naked-domain-root-doma... , and I quote directly ... "Never one to let a RFC stand in the way of a solution to a real problem, we're happy to ann…

Is a deliberate violation of a spec really a bug? And I don't think their choice was "move fast and break things" at all.

It is a nightmare, but the spec is the source of the nightmare.

Re: What came first: the CNAME or the A record?

#124
post #90

It's remarkable that the ordinary DNS lookup function in glibc doesn't work if the records aren't in the right order. It's amazing to me we went 20+ years without that causing more problems. My guess is most people publishing DNS records just sort of knew that the order mattered in practice, maybe figuring it out in early testing.

The last time this came up, people said that it was important to filter out unrelated address records in the answer section (with names to which the CNAME chain starting at the question name does not lead). Without the ordering constraint (or a rather low limit on the number of CNAMEs in a response), this needs a robust data structure for looking up DNS names. Most in-process stub resolvers (including the glibc one)…

[deleted]

Re: What came first: the CNAME or the A record?

#125

Earlier quoted context omitted.

The article makes it very clear that the ambiguity arises in another phrase: “difference in ordering of the RRs in the answer section is not significant”, which is applied to an example; the problem with examples being that they are illustrative, viz. generalisable, and thus may permit reordering everywhere, and in any case, whether they should or shouldn’t becomes a matter of pragmatic context. Which goes to show, o…

it wouldn't be a problem if they tested it properly... especially WHEN stuff is ambigous

They may not have realized their interpretation is ambiguous until after the incident, that’s the kind of stuff you realize after you find a bug and do a deep dive in the literature for a post mortem. They probably worked with the certitude that record order is irrelevant until that point.

Re: What came first: the CNAME or the A record?

#126
post #72
post #69

Earlier quoted context omitted.

Is the property of an answer being ordered in the order that resolutions were performed to construct it /that/ fragile? Randomization within the final answer RRSet is fine (and maybe even preferred in a lot of cases)

Well cisco had their switches get into a boot loop, that sounds very broken...

Yes it’s a well known behaviour from these Cisco switches, not just reliant on name ordering. If SBS fails they reboot.

We thought it as just the default ntp servers abut had some reboot during this event because www.cisco.com was unavailable.

Re: What came first: the CNAME or the A record?

#127
post #67

My take is quite cynical on this.. This post reads to me like a post-justification of some strange newly introduced behaviour. Please order the answer in the order the resolutions were performed to arrive at the final answer (regardless of cache timings). Anything else makes little sense, especially not in the name of some micro-optimization (which could likely be approached in other ways that don’t alter behaviour).

The DNS specification should be updated to say CNAMES _must_ be ordered at the top rather than "possibly". Cloudflare was complying with the specification. Cisco was relying on unspecified behavior that happened to be common.

I’m no fan of the centralised intenet cloudflare heralds, but blaming anyone but Cisco for this reboot behaviour is wrong.

Re: What came first: the CNAME or the A record?

#128
post #90

It's remarkable that the ordinary DNS lookup function in glibc doesn't work if the records aren't in the right order. It's amazing to me we went 20+ years without that causing more problems. My guess is most people publishing DNS records just sort of knew that the order mattered in practice, maybe figuring it out in early testing.

The last time this came up, people said that it was important to filter out unrelated address records in the answer section (with names to which the CNAME chain starting at the question name does not lead). Without the ordering constraint (or a rather low limit on the number of CNAMEs in a response), this needs a robust data structure for looking up DNS names. Most in-process stub resolvers (including the glibc one)…

Doesn't it need to go through the CNAME chain no matter what? If it's doing that, isn't filtering at most tracking all the records that matched? That requires a trivial data structure.

Parsing the answer section in a single pass requires more finesse, but does it need fancier data structures than a string to string map? And failing that you can loop upon CNAME. I wouldn't call a depth limit like 20 "a rather low limit on the number of CNAMEs in a response", and max 20 passes through a max 64KB answer section is plenty fast.

Re: What came first: the CNAME or the A record?

#129

Earlier quoted context omitted.

The DNS specification should be updated to say CNAMES _must_ be ordered at the top rather than "possibly". Cloudflare was complying with the specification. Cisco was relying on unspecified behavior that happened to be common.

The only reasonable interpretation of "possibly prefaced" is that the CNAMEs either come first or not at all (hence "possibly"). Nowhere the RFC suggests that they may come in the middle. Something is broken in Cloudflare since a couple of years. It takes a very specific engineering culture to run the internet and it's just not there anymore.

Except that "first or not at all" doesn't prevent this bug from triggering.

Nowhere the RFC suggests multiple CNAMEs need to be in a specific order.

Post reply on HN