summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-02 00:28:32 -0700
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-03 02:49:59 -0700
commitc7653aa9d4276098a7a6b5ade5ffce5bf5d089e8 (patch)
treecf370204c8d50de7843871100de5585be7e59c51 /table
parentf75d45bbc4a58d21c5c6e261c7b68eac7495f107 (diff)
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 <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/vrf.go6
1 files changed, 3 insertions, 3 deletions
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 {