summaryrefslogtreecommitdiffhomepage
path: root/config/default.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/default.go')
-rw-r--r--config/default.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/config/default.go b/config/default.go
index a95b535b..92c743dd 100644
--- a/config/default.go
+++ b/config/default.go
@@ -119,6 +119,9 @@ func setDefaultNeighborConfigValuesWithViper(v *viper.Viper, n *Neighbor, asn ui
}
if n.Config.NeighborInterface != "" {
+ if n.RouteServer.Config.RouteServerClient {
+ return fmt.Errorf("configuring route server client as unnumbered peer is not supported")
+ }
addr, err := GetIPv6LinkLocalNeighborAddress(n.Config.NeighborInterface)
if err != nil {
return err
@@ -148,7 +151,12 @@ func setDefaultNeighborConfigValuesWithViper(v *viper.Viper, n *Neighbor, asn ui
}
if len(n.AfiSafis) == 0 {
- if ipAddr, err := net.ResolveIPAddr("ip", n.Config.NeighborAddress); err != nil {
+ if n.Config.NeighborInterface != "" {
+ n.AfiSafis = []AfiSafi{
+ defaultAfiSafi(AFI_SAFI_TYPE_IPV4_UNICAST, true),
+ defaultAfiSafi(AFI_SAFI_TYPE_IPV6_UNICAST, true),
+ }
+ } else if ipAddr, err := net.ResolveIPAddr("ip", n.Config.NeighborAddress); err != nil {
return fmt.Errorf("invalid neighbor address: %s", n.Config.NeighborAddress)
} else if ipAddr.IP.To4() != nil {
n.AfiSafis = []AfiSafi{defaultAfiSafi(AFI_SAFI_TYPE_IPV4_UNICAST, true)}