summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/fsm.go
diff options
context:
space:
mode:
authorSerguei Bezverkhi <sbezverk@cisco.com>2020-05-12 22:05:44 -0400
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2020-05-13 12:58:51 +0900
commit833188f52610dcf47c57250788b36625b10a8925 (patch)
tree2c4f80208c1d40bc0e52a2f379421039fe577f56 /pkg/server/fsm.go
parent95745b6cf9a5ed229c5494bb0b531215dec38dbe (diff)
extend attributes proto for Prefix SID support
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
Diffstat (limited to 'pkg/server/fsm.go')
-rw-r--r--pkg/server/fsm.go20
1 files changed, 9 insertions, 11 deletions
diff --git a/pkg/server/fsm.go b/pkg/server/fsm.go
index b5bcd2d8..b274c210 100644
--- a/pkg/server/fsm.go
+++ b/pkg/server/fsm.go
@@ -757,19 +757,17 @@ func capabilitiesFromConfig(pConf *config.Neighbor) []bgp.ParameterCapabilityInt
}
}
- // unnumbered BGP
- if pConf.Config.NeighborInterface != "" {
- tuples := []*bgp.CapExtendedNexthopTuple{}
- families, _ := config.AfiSafis(pConf.AfiSafis).ToRfList()
- for _, family := range families {
- if family == bgp.RF_IPv6_UC {
- continue
- }
- tuple := bgp.NewCapExtendedNexthopTuple(family, bgp.AFI_IP6)
- tuples = append(tuples, tuple)
+ // Extended Nexthop Capability (Code 5)
+ tuples := []*bgp.CapExtendedNexthopTuple{}
+ families, _ := config.AfiSafis(pConf.AfiSafis).ToRfList()
+ for _, family := range families {
+ if family == bgp.RF_IPv6_UC {
+ continue
}
- caps = append(caps, bgp.NewCapExtendedNexthop(tuples))
+ tuple := bgp.NewCapExtendedNexthopTuple(family, bgp.AFI_IP6)
+ tuples = append(tuples, tuple)
}
+ caps = append(caps, bgp.NewCapExtendedNexthop(tuples))
// ADD-PATH Capability
if c := capAddPathFromConfig(pConf); c != nil {