summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-12-05 11:54:29 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-12-05 13:59:06 +0900
commit3ade7e8978b9aca123e61dd7406ec30450bda5b9 (patch)
treee423c5f4c749c35eb583ce0e4f92d5bde1e405b2
parentc7618602604dead3716b7babd9e3bc2b4fc629ce (diff)
gobgp: fix the adding of unnumbered BGP neighbor
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--gobgp/cmd/neighbor.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/gobgp/cmd/neighbor.go b/gobgp/cmd/neighbor.go
index a6ba72b7..fb4b68f5 100644
--- a/gobgp/cmd/neighbor.go
+++ b/gobgp/cmd/neighbor.go
@@ -992,6 +992,11 @@ func modNeighbor(cmdType string, args []string) error {
}
if unnumbered {
peer.Config.NeighborInterface = m["interface"][0]
+ addr, err := config.GetIPv6LinkLocalNeighborAddress(peer.Config.NeighborInterface)
+ if err != nil {
+ return nil, err
+ }
+ peer.State.NeighborAddress = addr
} else {
peer.Config.NeighborAddress = m[""][0]
peer.State.NeighborAddress = m[""][0]