kopia lustrzana https://github.com/cyoung/stratux
Fixed bug in network code.
Clients with blank hostname was causing IP to be ignored.pull/29/head
rodzic
ecd29a8425
commit
7836fe55d3
|
@ -57,6 +57,9 @@ func getDHCPLeases() (map[string]string, error) {
|
||||||
hostname := strings.TrimRight(strings.TrimLeft(strings.Join(spaced[3:], " "), "\""), "\";")
|
hostname := strings.TrimRight(strings.TrimLeft(strings.Join(spaced[3:], " "), "\""), "\";")
|
||||||
ret[block_ip] = hostname
|
ret[block_ip] = hostname
|
||||||
open_block = false
|
open_block = false
|
||||||
|
} else if open_block && strings.HasPrefix(spaced[0], "}") { // No hostname.
|
||||||
|
open_block = false
|
||||||
|
ret[block_ip] = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret, nil
|
return ret, nil
|
||||||
|
|
Ładowanie…
Reference in New Issue