From vladimir.levijev at gmail.com Tue Sep 3 09:29:18 2019 From: vladimir.levijev at gmail.com (Vladimir Levijev) Date: Tue, 3 Sep 2019 12:29:18 +0300 Subject: [ldns-users] NSID support In-Reply-To: References: Message-ID: On Wed, Aug 14, 2019 at 7:00 PM Vladimir Levijev wrote: Hi, > Did I understand correctly that currently ldns library does not > support enabling NSID when doing a query and getting it from reply? > > E. g. from manpage of "dig": > > +[no]nsid > Include an EDNS name server ID request when sending a query. > > $ dig ... +nsid > > [...] > ;; OPT PSEUDOSECTION: > ; EDNS: version: 0, flags:; udp: 4096 > ; NSID: 23 3a 68 16 3d 42 9b 72 ("foobar.tky") > [...] So, no ideas? Cheers, VL From willem at nlnetlabs.nl Thu Sep 5 14:38:07 2019 From: willem at nlnetlabs.nl (Willem Toorop) Date: Thu, 5 Sep 2019 16:38:07 +0200 Subject: [ldns-users] NSID support In-Reply-To: References: Message-ID: <2cedfc1e-7d14-c7df-28e5-d58c72d91de5@nlnetlabs.nl> Hi Vladimir, I have attached a "small" example program (nsid-example.c) that illustrates how to use the ldns_pkt_set_edns_data() and ldns_pkt_edns_data() functions to set and get EDNS Options. Here are some usage examples: $ ./nsid-example ./nsid-example $ ./nsid-example 193.0.14.129 upstream 193.0.14.129, returned NSID: "ns2.nl-ams.k.ripe.net" $ ./nsid-example 37.209.192.10 upstream 37.209.192.10, returned NSID: "dns5.mel" $ ./nsid-example 9.9.9.10 upstream 9.9.9.10, returned NSID: "res210.ams.rrdns.pch.net" $ ./nsid-example 8.8.8.8 Could not get EDNS data Good luck and cheers, -- Willem On 03-09-19 11:29, Vladimir Levijev wrote: > On Wed, Aug 14, 2019 at 7:00 PM Vladimir Levijev > wrote: > > Hi, > >> Did I understand correctly that currently ldns library does not >> support enabling NSID when doing a query and getting it from reply? >> >> E. g. from manpage of "dig": >> >> +[no]nsid >> Include an EDNS name server ID request when sending a query. >> >> $ dig ... +nsid >> >> [...] >> ;; OPT PSEUDOSECTION: >> ; EDNS: version: 0, flags:; udp: 4096 >> ; NSID: 23 3a 68 16 3d 42 9b 72 ("foobar.tky") >> [...] > > So, no ideas? > > Cheers, > > VL > _______________________________________________ > ldns-users mailing list > ldns-users at nlnetlabs.nl > https://open.nlnetlabs.nl/mailman/listinfo/ldns-users > -------------- next part -------------- A non-text attachment was scrubbed... Name: nsid-example.c Type: text/x-csrc Size: 2739 bytes Desc: not available URL: From kpw at apio.co.uk Thu Sep 5 15:02:59 2019 From: kpw at apio.co.uk (Kier Prior-Williams) Date: Thu, 05 Sep 2019 16:02:59 +0100 Subject: [ldns-users] =?utf-8?q?ldns-compare-zones=3A_difference_not_show?= =?utf-8?q?ing_up_for_some_=27duplicate=27_PTRs?= Message-ID: Hello, Using ldns-compare-zones, it's not showing up a difference and I can't work out why - hoping you can put me out of my misery ! ldns-compare-zones version: 1.7.1 Here's an example of the source/target zones, which I've attempted to anonymise (yes, multiple PTRs, but we are where we are!) src/66.57.10.in-addr.arpa: 66.57.10.in-addr.arpa. 28800 IN SOA nsh1.source.com. hostmaster.source.com. 2005100530 10800 3600 2419200 900 66.57.10.in-addr.arpa. 28800 IN NS nsh1.source.com. 66.57.10.in-addr.arpa. 28800 IN NS nsp2.source.com. 66.57.10.in-addr.arpa. 28800 IN NS nsp1.source.com. 10.66.57.10.in-addr.arpa. 28800 IN PTR www.abcdef.com. 10.66.57.10.in-addr.arpa. 28800 IN PTR documentation.abcdef.com. 19.66.57.10.in-addr.arpa. 28800 IN PTR iceabc.com. 19.66.57.10.in-addr.arpa. 28800 IN PTR iceabcs.com. 19.66.57.10.in-addr.arpa. 28800 IN PTR abclink.com. tgt/66.57.10.in-addr.arpa: 66.57.10.in-addr.arpa. 28800 IN SOA ns1.target.com. hostmaster.source.com. 2005100549 10800 3600 2419200 900 66.57.10.in-addr.arpa. 28800 IN NS ns3.target.com. 66.57.10.in-addr.arpa. 28800 IN NS ns2.target.com. 66.57.10.in-addr.arpa. 28800 IN NS ns1.target.com. 10.66.57.10.in-addr.arpa. 28800 IN PTR www.abcdef.com. 19.66.57.10.in-addr.arpa. 28800 IN PTR iceabc.com. 19.66.57.10.in-addr.arpa. 28800 IN PTR abclink.com. Run the cmd to compare and show all differences: # ldns-compare-zones -a prec/66.57.10.in-addr.arpa postc/66.57.10.in-addr.arpa ~+66.57.10.in-addr.arpa. 28800 IN NS ns1.target.com. ~+66.57.10.in-addr.arpa. 28800 IN NS ns2.target.com. ~+66.57.10.in-addr.arpa. 28800 IN NS ns3.target.com. ~-66.57.10.in-addr.arpa. 28800 IN NS nsh1.source.com. ~-66.57.10.in-addr.arpa. 28800 IN NS nsp1.source.com. ~-66.57.10.in-addr.arpa. 28800 IN NS nsp2.source.com. ~-19.66.57.10.in-addr.arpa. 28800 IN PTR iceabcs.com. +0 -0 ~2 It doesn't list the difference for the 'documentation.abcdef.com' PTR record. It does list the difference for the next PTR (3 in the source, 2 in the target) If I add another PTR record into both source & target, i.e. 10.66.57.10.in-addr.arpa. 28800 IN PTR documentation2.abcdef.com. The "missing' target PTR does then show up ! # ldns-compare-zones -a prec/66.57.10.in-addr.arpa postc/66.57.10.in-addr.arpa ~+66.57.10.in-addr.arpa. 28800 IN NS ns1.target.com. ~+66.57.10.in-addr.arpa. 28800 IN NS ns2.target.com. ~+66.57.10.in-addr.arpa. 28800 IN NS ns3.target.com. ~-66.57.10.in-addr.arpa. 28800 IN NS nsh1.source.com. ~-66.57.10.in-addr.arpa. 28800 IN NS nsp1.source.com. ~-66.57.10.in-addr.arpa. 28800 IN NS nsp2.source.com. ~-10.66.57.10.in-addr.arpa. 28800 IN PTR documentation.abcdef.com. ~-19.66.57.10.in-addr.arpa. 28800 IN PTR iceabcs.com. +0 -0 ~3 What am I missing here ?! Thanks. -- Kier PW -------------- next part -------------- An HTML attachment was scrubbed... URL: From vladimir.levijev at gmail.com Thu Sep 5 15:23:41 2019 From: vladimir.levijev at gmail.com (Vladimir Levijev) Date: Thu, 5 Sep 2019 18:23:41 +0300 Subject: [ldns-users] NSID support In-Reply-To: <2cedfc1e-7d14-c7df-28e5-d58c72d91de5@nlnetlabs.nl> References: <2cedfc1e-7d14-c7df-28e5-d58c72d91de5@nlnetlabs.nl> Message-ID: On Thu, Sep 5, 2019 at 5:38 PM Willem Toorop wrote: Hi Willem! > I have attached a "small" example program (nsid-example.c) that > illustrates how to use the ldns_pkt_set_edns_data() and > ldns_pkt_edns_data() functions to set and get EDNS Options. > Here are some usage examples: > > $ ./nsid-example > ./nsid-example > > $ ./nsid-example 193.0.14.129 > upstream 193.0.14.129, returned NSID: "ns2.nl-ams.k.ripe.net" > > $ ./nsid-example 37.209.192.10 > upstream 37.209.192.10, returned NSID: "dns5.mel" > > $ ./nsid-example 9.9.9.10 > upstream 9.9.9.10, returned NSID: "res210.ams.rrdns.pch.net" > > $ ./nsid-example 8.8.8.8 > Could not get EDNS data Wow, that works! Thank you a lot! ;-) Cheers, VL