Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected profile overrides IPv6 setting #182

Closed
matsduf opened this issue Dec 10, 2020 · 4 comments · Fixed by #183
Closed

Selected profile overrides IPv6 setting #182

matsduf opened this issue Dec 10, 2020 · 4 comments · Fixed by #183
Assignees
Labels
T-Bug Type: Bug in software or error in test case description
Milestone

Comments

@matsduf
Copy link
Contributor

matsduf commented Dec 10, 2020

If both profile (--profile) and IPv6 (--no-ipv6/--ipv6`) are selected then the IPv6 setting will be overridden by the profile, but the other way around is expected.

First run the test with --no-ipv6 but no profile selected. Note the messages "IPv6 is disabled".

$ zonemaster-cli --no-ipv6 zonemaster.net --locale en_US.UTF-8 --test basic --level INFO
Seconds Level     Message
======= ========= =======
   0.00 INFO      Using version v4.0.3 of the Zonemaster engine.
   1.06 INFO      Parent domain 'net' was found for the tested domain.
   4.60 INFO      IPv6 is disabled, not sending "NS" query to ns.nic.se/2001:67c:124c:100a::45.
   4.60 INFO      IPv4 is enabled, can send "NS" query to ns.nic.se/91.226.36.45.
   4.62 INFO      Nameserver ns.nic.se/91.226.36.45 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..
   4.62 INFO      IPv4 is enabled, can send "NS" query to ns2.nic.fr/192.93.0.4.
   4.67 INFO      Nameserver ns2.nic.fr/192.93.0.4 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..
   4.67 INFO      IPv6 is disabled, not sending "NS" query to ns2.nic.fr/2001:660:3005:1::1:2.
   4.67 INFO      IPv6 is disabled, not sending "NS" query to ns3.nic.se/2001:67c:124c:2007::45.
   4.68 INFO      IPv4 is enabled, can send "NS" query to ns3.nic.se/91.226.37.45.
   4.69 INFO      Nameserver ns3.nic.se/91.226.37.45 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..
   4.69 INFO      Functional nameserver found. "A" query for www.zonemaster.net test skipped.

Again run with --no-ipv6 but also select a profile, which in this case is the same profile as would be used anyway. Note the messages "IPv6 is enabled".

$ zonemaster-cli --no-ipv6 zonemaster.net --locale en_US.UTF-8 --test basic --level INFO --profile /usr/local/lib/perl5/site_perl/auto/share/dist/Zonemaster-Engine/profile.json
Loading profile from /usr/local/lib/perl5/site_perl/auto/share/dist/Zonemaster-Engine/profile.json.

Seconds Level     Message
======= ========= =======
   0.00 INFO      Using version v4.0.3 of the Zonemaster engine.
   1.11 INFO      Parent domain 'net' was found for the tested domain.
   6.13 INFO      IPv6 is enabled, can send "NS" query to ns.nic.se/2001:67c:124c:100a::45.
   6.14 NOTICE    Nameserver ns.nic.se/2001:67c:124c:100a::45 did not respond to NS query.
   6.14 INFO      IPv4 is enabled, can send "NS" query to ns.nic.se/91.226.36.45.
   6.16 INFO      Nameserver ns.nic.se/91.226.36.45 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..
   6.17 INFO      IPv4 is enabled, can send "NS" query to ns2.nic.fr/192.93.0.4.
   6.21 INFO      Nameserver ns2.nic.fr/192.93.0.4 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..
   6.21 INFO      IPv6 is enabled, can send "NS" query to ns2.nic.fr/2001:660:3005:1::1:2.
   6.22 NOTICE    Nameserver ns2.nic.fr/2001:660:3005:1::1:2 did not respond to NS query.
   6.22 INFO      IPv6 is enabled, can send "NS" query to ns3.nic.se/2001:67c:124c:2007::45.
   6.23 NOTICE    Nameserver ns3.nic.se/2001:67c:124c:2007::45 did not respond to NS query.
   6.23 INFO      IPv4 is enabled, can send "NS" query to ns3.nic.se/91.226.37.45.
   6.24 INFO      Nameserver ns3.nic.se/91.226.37.45 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..
   6.24 INFO      Functional nameserver found. "A" query for www.zonemaster.net test skipped.

This issue was first reported as zonemaster/zonemaster-engine#856.

@matsduf matsduf added the A-Code label Dec 10, 2020
@matsduf matsduf added this to the v2020.2 milestone Dec 10, 2020
@matsduf matsduf self-assigned this Dec 10, 2020
@matsduf matsduf added S-ProposalExists T-Bug Type: Bug in software or error in test case description labels Dec 10, 2020
@matsduf
Copy link
Contributor Author

matsduf commented Dec 10, 2020

Resolved by PR #183.

@ghost
Copy link

ghost commented Jan 19, 2021

The current implementation in #183 (commit 5fd9435 merged into develop) overrides the settings set in the profile.json file even when no option are passed on the command line.

For instance, disabling IPv4 in the profile.json file will result in a usage of IPv4 in the CLI.

profile.json :

 "net" : {
        "ipv4" : false,
        "ipv6" : true
    },
$ zonemaster-cli --profile /usr/local/share/perl/5.26.1/auto/share/dist/Zonemaster-Engine/profile.json --level INFO --test basic zonemaster.net                                           
Loading profile from /usr/local/share/perl/5.26.1/auto/share/dist/Zonemaster-Engine/profile.json.

Seconds Level     Message
======= ========= =======
   0.00 INFO      Using version v4.0.3 of the Zonemaster engine.
   0.57 INFO      Parent domain 'net' was found for the tested domain.
   2.05 INFO      IPv6 is enabled, can send "NS" query to ns.nic.se/2001:67c:124c:100a::45.
   2.11 INFO      Nameserver ns.nic.se/2001:67c:124c:100a::45 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..                                                                                   
   2.11 INFO      IPv4 is enabled, can send "NS" query to ns.nic.se/91.226.36.45.
   2.18 INFO      Nameserver ns.nic.se/91.226.36.45 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..                                                                                             
   2.18 INFO      IPv4 is enabled, can send "NS" query to ns2.nic.fr/192.93.0.4.
   2.23 INFO      Nameserver ns2.nic.fr/192.93.0.4 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..                                                                                              
   2.23 INFO      IPv6 is enabled, can send "NS" query to ns2.nic.fr/2001:660:3005:1::1:2.
   2.26 INFO      Nameserver ns2.nic.fr/2001:660:3005:1::1:2 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..                                                                                    
   2.27 INFO      IPv6 is enabled, can send "NS" query to ns3.nic.se/2001:67c:124c:2007::45.
   2.33 INFO      Nameserver ns3.nic.se/2001:67c:124c:2007::45 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..                                                                                  
   2.33 INFO      IPv4 is enabled, can send "NS" query to ns3.nic.se/91.226.37.45.
   2.40 INFO      Nameserver ns3.nic.se/91.226.37.45 listed these servers as glue: ns.nic.se.,ns2.nic.fr.,ns3.nic.se..                                                                                            
   2.40 INFO      Functional nameserver found. "A" query for www.zonemaster.net test skipped.

I think there is a precedence issue with #183. If no options are passed on the command line, the settings in the profile file should be used.

@matsduf
Copy link
Contributor Author

matsduf commented Jan 19, 2021

I think there is a precedence issue with #183. If no options are passed on the command line, the settings in the profile file should be used.

It is a good observation. What #183 does is moving the setting of IPv4/6 until after the profile is loaded. I guess the issue was there before, but for some reason not observed or shadowed by the order.

I will look into it, and provide a solution.

@matsduf
Copy link
Contributor Author

matsduf commented Feb 9, 2021

Resolved by #185.

@matsduf matsduf closed this as completed Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Type: Bug in software or error in test case description
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant