summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/server.go')
-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)