Bugfix Namensanzeige PCxxyy
All checks were successful
release-tag / release-image (push) Successful in 1m50s

This commit is contained in:
2025-05-09 10:59:00 +02:00
parent cc7c8d8b9b
commit 34fde06fce

10
main.go
View File

@@ -137,7 +137,15 @@ func handleRange(w http.ResponseWriter, r *http.Request) {
fmt.Println("Ungültige IP-Adresse!")
return
}
N := "PC" + octets[2] + octets[3]
O3 := ""
O4 := ""
if len(octets[2]) < 2 {
O3 = "0" + octets[2]
}
if len(octets[3]) < 2 {
O3 = "0" + octets[3]
}
N := "PC" + O3 + O4
d.Rows = append(d.Rows, addrPair{IPv4: b.IPv4, IPv6: b.IPv6, Name: N})
}
}