Move the root server addresses to a header #3587

merged 1 commit into from Mar 21, 2016


None yet

6 participants


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
@Habbie Habbie commented on the diff Mar 17, 2016
+ };
+static const char*rootIps6[]={"2001:503:ba3e::2:30", //
+ "2001:500:84::b", //
+ "2001:500:2::c", //
+ "2001:500:2d::d", //
+ NULL, //
+ "2001:500:2f::f", //
+ NULL, //
+ "2001:500:1::53", //
+ "2001:7fe::53", //
+ "2001:503:c27::2:30", //
+ "2001:7fd::1", //
+ "2001:500:9f::42", //
+ "2001:dc3::35" //
+ };
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 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 Mar 18, 2016 Member

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

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 commented Mar 17, 2016

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

zeha commented Mar 17, 2016

Ship as zone, get all my <3

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
tfarina commented Mar 21, 2016

Would be fine to make the following?

extern const char* rootIps6[];
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