diff options
author | Wataru Ishida <ishida.wataru@lab.ntt.co.jp> | 2016-11-04 13:19:47 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-11-04 13:19:47 +0900 |
commit | a17832195c5fc42d6d0ec3dd7cc4868694bed88d (patch) | |
tree | 14381d27f1e58a6c399de90cc206d2433d8d366f /gobgpd | |
parent | 97bc9dd0da71ce743dbb7deb4a09f260ca518dcc (diff) |
support neighbor belongs to VRF
$ gobgp vrf add red rd 100:100 rt both 100:100
$ gobgp neighbor add 10.0.0.1 as 2 vrf red
$ gobgp vrf red neighbor
Peer AS Up/Down State |#Advertised Received Accepted
10.0.0.1 2 never Active | 0 0 0
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'gobgpd')
-rw-r--r-- | gobgpd/main.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go index aaabf333..a92c837e 100644 --- a/gobgpd/main.go +++ b/gobgpd/main.go @@ -265,15 +265,22 @@ func main() { for i, p := range added { log.Infof("Peer %v is added", p.Config.NeighborAddress) - bgpServer.AddNeighbor(&added[i]) + if err := bgpServer.AddNeighbor(&added[i]); err != nil { + log.Warn(err) + } } for i, p := range deleted { log.Infof("Peer %v is deleted", p.Config.NeighborAddress) - bgpServer.DeleteNeighbor(&deleted[i]) + if err := bgpServer.DeleteNeighbor(&deleted[i]); err != nil { + log.Warn(err) + } } for i, p := range updated { log.Infof("Peer %v is updated", p.Config.NeighborAddress) - u, _ := bgpServer.UpdateNeighbor(&updated[i]) + u, err := bgpServer.UpdateNeighbor(&updated[i]) + if err != nil { + log.Warn(err) + } updatePolicy = updatePolicy || u } |