summaryrefslogtreecommitdiffhomepage
path: root/table/policy.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/policy.go')
-rw-r--r--table/policy.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/table/policy.go b/table/policy.go
index 52d6900c..7148b764 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -515,7 +515,11 @@ func NewNeighborSet(c config.NeighborSet) (*NeighborSet, error) {
}
list := make([]net.IP, 0, len(c.NeighborInfoList))
for _, x := range c.NeighborInfoList {
- list = append(list, x.Address)
+ addr := net.ParseIP(x.Address)
+ if addr == nil {
+ return nil, fmt.Errorf("invalid address: %s", x.Address)
+ }
+ list = append(list, addr)
}
return &NeighborSet{
name: name,