From c7653aa9d4276098a7a6b5ade5ffce5bf5d089e8 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 2 Nov 2016 00:28:32 -0700 Subject: allow add local route with specific mpls label Also don't allocate label for local routes. The label management needs to work with other components rather than bgp. Signed-off-by: FUJITA Tomonori --- table/vrf.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'table') diff --git a/table/vrf.go b/table/vrf.go index 83b9e353..15b194db 100644 --- a/table/vrf.go +++ b/table/vrf.go @@ -29,15 +29,15 @@ type Vrf struct { LabelMap map[string]uint32 } -func (v *Vrf) ToGlobalPath(path *Path, label uint32) error { +func (v *Vrf) ToGlobalPath(path *Path) error { nlri := path.GetNlri() switch rf := path.GetRouteFamily(); rf { case bgp.RF_IPv4_UC: n := nlri.(*bgp.IPAddrPrefix) - path.OriginInfo().nlri = bgp.NewLabeledVPNIPAddrPrefix(n.Length, n.Prefix.String(), *bgp.NewMPLSLabelStack(label), v.Rd) + path.OriginInfo().nlri = bgp.NewLabeledVPNIPAddrPrefix(n.Length, n.Prefix.String(), *bgp.NewMPLSLabelStack(0), v.Rd) case bgp.RF_IPv6_UC: n := nlri.(*bgp.IPv6AddrPrefix) - path.OriginInfo().nlri = bgp.NewLabeledVPNIPv6AddrPrefix(n.Length, n.Prefix.String(), *bgp.NewMPLSLabelStack(label), v.Rd) + path.OriginInfo().nlri = bgp.NewLabeledVPNIPv6AddrPrefix(n.Length, n.Prefix.String(), *bgp.NewMPLSLabelStack(0), v.Rd) case bgp.RF_EVPN: n := nlri.(*bgp.EVPNNLRI) switch n.RouteType { -- cgit v1.2.3