checker: Improve error message about DNS
This commit is contained in:
parent
65dd0d51ca
commit
3108f13073
@ -635,11 +635,11 @@ func studentChecker(std *adlin.Student, also_check_matrix bool, offline bool) {
|
|||||||
// Check DNS
|
// Check DNS
|
||||||
if addr, err := check_dns(std.MyDelegatedDomain(), dnsIP); err == nil {
|
if addr, err := check_dns(std.MyDelegatedDomain(), dnsIP); err == nil {
|
||||||
if addr == nil {
|
if addr == nil {
|
||||||
dnsAt := " at " + dnsIP
|
dnsAt := ""
|
||||||
if glueErr != nil {
|
if glueErr != nil {
|
||||||
dnsAt = " + there is a problem with the GLUE record: " + glueErr.Error()
|
dnsAt = " + there is a problem with the GLUE record: " + glueErr.Error()
|
||||||
}
|
}
|
||||||
if errreg := std.RegisterChallengeError(CheckMap[tunnel_version][DNSDelegation], fmt.Errorf("%s: empty response from the server%s", std.MyDelegatedDomain(), dnsAt)); errreg != nil {
|
if errreg := std.RegisterChallengeError(CheckMap[tunnel_version][DNSDelegation], fmt.Errorf("dig @%s %s AAAA: empty response from the server%s", dnsIP, std.MyDelegatedDomain(), dnsAt)); errreg != nil {
|
||||||
log.Printf("Unable to register challenge error for %s: %s\n", std.Login, errreg)
|
log.Printf("Unable to register challenge error for %s: %s\n", std.Login, errreg)
|
||||||
}
|
}
|
||||||
} else if tunnel_version == 3 && dnsIP == stdIP {
|
} else if tunnel_version == 3 && dnsIP == stdIP {
|
||||||
@ -784,7 +784,7 @@ func studentChecker(std *adlin.Student, also_check_matrix bool, offline bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if errreg := std.RegisterChallengeError(CheckMap[tunnel_version][DNSDelegation], err); errreg != nil {
|
if errreg := std.RegisterChallengeError(CheckMap[tunnel_version][DNSDelegation], fmt.Errorf("dig @%s %s: %w", dnsIP, std.MyDelegatedDomain(), err)); errreg != nil {
|
||||||
log.Printf("Unable to register challenge error for %s: %s\n", std.Login, errreg)
|
log.Printf("Unable to register challenge error for %s: %s\n", std.Login, errreg)
|
||||||
}
|
}
|
||||||
if verbose {
|
if verbose {
|
||||||
|
Reference in New Issue
Block a user