summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Barroso <dbarrosop@dravetech.com>2018-04-25 23:48:18 +0200
committerGitHub <noreply@github.com>2018-04-25 23:48:18 +0200
commitea877dc6111f89c1fe4493e0b709f99448fd70a1 (patch)
treea9ba06f903bb48b8b0c0def679f189dee9440d73
parentd31262de7d91c81ff979b39950d2d859666dfa3f (diff)
Restore PathIdentifier for paths belonging to VRFs
-rw-r--r--table/path.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/table/path.go b/table/path.go
index de60e615..0c201447 100644
--- a/table/path.go
+++ b/table/path.go
@@ -1153,10 +1153,14 @@ func (v *Vrf) ToGlobalPath(path *Path) error {
switch rf := path.GetRouteFamily(); rf {
case bgp.RF_IPv4_UC:
n := nlri.(*bgp.IPAddrPrefix)
+ pathIdentifier := path.GetNlri().PathIdentifier()
path.OriginInfo().nlri = bgp.NewLabeledVPNIPAddrPrefix(n.Length, n.Prefix.String(), *bgp.NewMPLSLabelStack(0), v.Rd)
+ path.GetNlri().SetPathIdentifier(pathIdentifier)
case bgp.RF_IPv6_UC:
n := nlri.(*bgp.IPv6AddrPrefix)
+ pathIdentifier := path.GetNlri().PathIdentifier()
path.OriginInfo().nlri = bgp.NewLabeledVPNIPv6AddrPrefix(n.Length, n.Prefix.String(), *bgp.NewMPLSLabelStack(0), v.Rd)
+ path.GetNlri().SetPathIdentifier(pathIdentifier)
case bgp.RF_EVPN:
n := nlri.(*bgp.EVPNNLRI)
switch n.RouteType {