From 232b30117c8eafc5cae7aec81ce9fafe742bdd4b Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Fri, 1 May 2015 10:06:42 +0000 Subject: table: add support for route target constraint nlri add rtc route $ gobgp global rib add 65000 77 -a rtc check it $ gobgp global rib -a rtc Network Next Hop AS_PATH Age Attrs *> 65001:65000:75 0.0.0.0 [65001] 00:15:35 [{Origin: IGP}] Signed-off-by: ISHIDA Wataru --- table/destination.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'table/destination.go') diff --git a/table/destination.go b/table/destination.go index bf4afe63..a01c6e04 100644 --- a/table/destination.go +++ b/table/destination.go @@ -1043,3 +1043,15 @@ func NewEncapDestination(nlri bgp.AddrPrefixInterface) *EncapDestination { DestinationDefault: d, } } + +type RouteTargetDestination struct { + *DestinationDefault +} + +func NewRouteTargetDestination(nlri bgp.AddrPrefixInterface) *RouteTargetDestination { + d := NewDestinationDefault(nlri) + d.ROUTE_FAMILY = bgp.RF_RTC_UC + return &RouteTargetDestination{ + DestinationDefault: d, + } +} -- cgit v1.2.3