just needs reserved prefix warnings implemented
This commit is contained in:
12
netsplit/conts.go
Normal file
12
netsplit/conts.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package netsplit
|
||||
|
||||
import (
|
||||
`net/netip`
|
||||
)
|
||||
|
||||
var (
|
||||
ReservedNets map[netip.Prefix]string
|
||||
reservedNetsOrig map[string]string = map[string]string{
|
||||
"": "",
|
||||
}
|
||||
)
|
||||
@@ -1,3 +1,20 @@
|
||||
package netsplit
|
||||
|
||||
// TODO?
|
||||
import (
|
||||
`log`
|
||||
`net/netip`
|
||||
)
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
var pfx netip.Prefix
|
||||
|
||||
ReservedNets = make(map[netip.Prefix]string)
|
||||
|
||||
for np, reason := range reservedNetsOrig {
|
||||
if pfx, err = netip.ParsePrefix(np); err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
ReservedNets[pfx] = reason
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user