summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2020-07-04 22:05:23 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2020-07-04 22:05:23 +0900
commit2dbb18f93f2d1ff2ad1d7b9c042a6c97a23a5cb5 (patch)
tree730a581948b64c5a2a8d94f9ea68838892c7a0f7
parentb9c00dd59188d3377f6c64b30df2d4f03d6aebcc (diff)
server: don't send empty ExtendedNexthop capability
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
-rw-r--r--pkg/server/fsm.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/server/fsm.go b/pkg/server/fsm.go
index b274c210..932e0d76 100644
--- a/pkg/server/fsm.go
+++ b/pkg/server/fsm.go
@@ -767,7 +767,9 @@ func capabilitiesFromConfig(pConf *config.Neighbor) []bgp.ParameterCapabilityInt
tuple := bgp.NewCapExtendedNexthopTuple(family, bgp.AFI_IP6)
tuples = append(tuples, tuple)
}
- caps = append(caps, bgp.NewCapExtendedNexthop(tuples))
+ if len(tuples) != 0 {
+ caps = append(caps, bgp.NewCapExtendedNexthop(tuples))
+ }
// ADD-PATH Capability
if c := capAddPathFromConfig(pConf); c != nil {