summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-07 01:57:00 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-07 01:57:00 -0800
commit564a4a0bd260421443ca2c08ecff26648a4124ea (patch)
tree10f0e20558b4a96d83e63172bf23c5f682e49e3e /table
parent1268cfca64c46c963fed587b2197ebcd3750b367 (diff)
message: disable merging updates for ipv6
Looks broken. disable for now. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/message.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/table/message.go b/table/message.go
index acd6a256..a5926f11 100644
--- a/table/message.go
+++ b/table/message.go
@@ -169,7 +169,8 @@ func createUpdateMsgFromPath(path Path, msg *bgp.BGPMessage) *bgp.BGPMessage {
idx, _ := path.getPathAttr(bgp.BGP_ATTR_TYPE_MP_REACH_NLRI)
u := msg.Body.(*bgp.BGPUpdate)
reachAttr := u.PathAttributes[idx].(*bgp.PathAttributeMpReachNLRI)
- reachAttr.Value = append(reachAttr.Value, path.getNlri())
+ u.PathAttributes[idx] = bgp.NewPathAttributeMpReachNLRI(reachAttr.Nexthop.String(),
+ append(reachAttr.Value, path.getNlri()))
} else {
// we don't need to clone here but we
// might merge path to this message in
@@ -205,6 +206,9 @@ func isMergeable(p1 Path, p2 Path) bool {
if p1 == nil {
return false
}
+ if p1.GetRouteFamily() != bgp.RF_IPv4_UC {
+ return false
+ }
if p1.getSource() == p2.getSource() && isSamePathAttrs(p1.getPathAttrs(), p2.getPathAttrs()) {
return true
}