When tunnel doesn't PONG, ask to check firewall
This commit is contained in:
parent
8a2405e508
commit
94ed539e01
@ -371,6 +371,14 @@ func studentChecker(std *adlin.Student, also_check_matrix bool, offline bool) {
|
|||||||
})
|
})
|
||||||
if err != nil && verbose {
|
if err != nil && verbose {
|
||||||
log.Printf("%s: Unable to perform ping to %s: %s", std.Login, stdIP, err.Error())
|
log.Printf("%s: Unable to perform ping to %s: %s", std.Login, stdIP, err.Error())
|
||||||
|
|
||||||
|
if tunnel_version, err := minTunnelVersion(std, tun.SuffixIP); err == nil {
|
||||||
|
if has_test(CheckMap[tunnel_version], Firewalled) {
|
||||||
|
if e, err := std.GetChallengeError(CheckMap[tunnel_version][Firewalled]); err == nil && len(e.Error) > 0 {
|
||||||
|
std.RegisterChallengeError(CheckMap[tunnel_version][Firewalled], fmt.Errorf("Your host is unreachable, no more tests are performed. Check that you are not filtering the tunnel (Wireguard uses UDP datagrams), nor ICMPv6 as your host needs to respond to PING."))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,6 +135,12 @@ func (s *Student) GetStates() (ucs []*UnlockedChallenge, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Student) GetChallengeError(challenge_id int) (uc *ErroredChallenge, err error) {
|
||||||
|
uc = new(ErroredChallenge)
|
||||||
|
err = DBQueryRow("SELECT id_st, challenge, time, error FROM student_challenge_errors WHERE id_student = ? AND challenge = ?", s.Id, challenge_id).Scan(&uc.Id, &uc.Challenge, &uc.Time, &uc.Error)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Student) GetChallengeErrors() (ucs []*ErroredChallenge, err error) {
|
func (s *Student) GetChallengeErrors() (ucs []*ErroredChallenge, err error) {
|
||||||
if rows, errr := DBQuery("SELECT id_st, challenge, time, error FROM student_challenge_errors WHERE id_student = ?", s.Id); errr != nil {
|
if rows, errr := DBQuery("SELECT id_st, challenge, time, error FROM student_challenge_errors WHERE id_student = ?", s.Id); errr != nil {
|
||||||
return nil, errr
|
return nil, errr
|
||||||
|
Reference in New Issue
Block a user