summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-08-01 08:11:14 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-08-02 10:48:58 +0900
commit1890b4c5ef28fde6cff478a78e1ded3a65badd6b (patch)
tree332875e27ca4e85c3432c884dd038dc161be7dc3 /server
parenta46e8b6826fe95ff09278d75474faf7a14b5d8b1 (diff)
config: support unnumbered bgp peering
from configuration file: ```toml [[neighbors]] [[neighbors.afi-safis]] neighbor-interface = "eth0" peer-as = 65000 ``` Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/server.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index 9820f898..036a94ba 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1730,6 +1730,13 @@ func (s *BgpServer) AddNeighbor(c *config.Neighbor) (err error) {
func (server *BgpServer) deleteNeighbor(c *config.Neighbor, code, subcode uint8) error {
addr := c.Config.NeighborAddress
+ if intf := c.Config.NeighborInterface; intf != "" {
+ var err error
+ addr, err = config.GetIPv6LinkLocalNeighborAddress(intf)
+ if err != nil {
+ return err
+ }
+ }
n, y := server.neighborMap[addr]
if !y {
return fmt.Errorf("Can't delete a peer configuration for %s", addr)