checker: for each tun IP

This commit is contained in:
nemunaire 2021-03-04 01:32:09 +01:00
commit 9cd237daff
3 changed files with 90 additions and 79 deletions

View file

@ -104,7 +104,11 @@ type TunnelToken struct {
}
func (tt *TunnelToken) GetStudentIP() string {
return fmt.Sprintf("%s%x", StudentIP(tt.IdStudent).String(), tt.SuffixIP)
if tt.SuffixIP == 0 {
return fmt.Sprintf("%s%x", StudentIP(tt.IdStudent).String(), 1)
} else {
return fmt.Sprintf("%s%x", StudentIP(tt.IdStudent).String(), tt.SuffixIP)
}
}
func TokenFromText(token string) []byte {