Move the root server addresses to a header #3587

Merged
merged 1 commit into from Mar 21, 2016

Projects

None yet

6 participants

@pieterlexis
Member

And update the L-Root address

Closes #3533
Closes #3534

@pieterlexis pieterlexis Move the root server addresses to a single place
Also, update the L-root IPv6 Address

Closes #3533
Closes #3534
10c9647
@Habbie Habbie commented on the diff Mar 17, 2016
pdns/root-addresses.hh
+ };
+
+static const char*rootIps6[]={"2001:503:ba3e::2:30", // a.root-servers.net.
+ "2001:500:84::b", // b.root-servers.net.
+ "2001:500:2::c", // c.root-servers.net.
+ "2001:500:2d::d", // d.root-servers.net.
+ NULL, // e.root-servers.net.
+ "2001:500:2f::f", // f.root-servers.net.
+ NULL, // g.root-servers.net.
+ "2001:500:1::53", // h.root-servers.net.
+ "2001:7fe::53", // i.root-servers.net.
+ "2001:503:c27::2:30", // j.root-servers.net.
+ "2001:7fd::1", // k.root-servers.net.
+ "2001:500:9f::42", // l.root-servers.net.
+ "2001:dc3::35" // m.root-servers.net.
+ };
@Habbie
Habbie Mar 17, 2016 Member

While okay in practice (this file is only included once per project, in fact we only have one consumer left), the header should not contain the content - it should just announce its availability while the content should live in a .cc file so it ends up in one .o file.

@Habbie
Habbie Mar 17, 2016 Member

I just realised that because they are static, the worst that could happen is that they get duplicated. There is no actual risk of symbol conflict. Feel free to keep it this way.

@pieterlexis
pieterlexis Mar 18, 2016 Member

isn't the duplication avoided with the #pragma once?

@zeha
zeha Mar 18, 2016 Collaborator

#pragma once is a preprocessor thing. Each compiler invocation will still compile the file and you may end up with one static copy of the data in each compilation unit that includes the header.

@nlyan
Contributor
nlyan commented Mar 17, 2016

Why not ship them as a zone file like Bind does?

@zeha
Collaborator
zeha commented Mar 17, 2016

Ship as zone, get all my <3

@Habbie
Member
Habbie commented Mar 17, 2016

We do support reading root hints as a zone. We just also have a builtin copy in case you don't have one. Debian should feel free to default to pointing to the root hints shipped and updated with the distro.

@ahupowerdns ahupowerdns merged commit 51098cb into PowerDNS:master Mar 21, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tfarina
Contributor
tfarina commented Mar 21, 2016

Would be fine to make the following?

root-addresses.hh
extern const char* rootIps6[];

root-addresses.cc
const char* rootIps6[] {
...
};

It won't hurt, right? And will be slightly better, no?

@pieterlexis pieterlexis deleted the pieterlexis:l-root branch Mar 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment