diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2015-06-27 23:28:54 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-07-01 21:24:40 +0900 |
commit | ccfded2fee746664b576df0a068aec727cb5fae5 (patch) | |
tree | c52f10638ad74bca773a7e6120a2edf507670221 /packet | |
parent | 8a3724c7fdd6f02311e669f2aa0fc28190faaf66 (diff) |
server/cli: support add/delete EVPN_INCLUSIVE_MULTICAST_ETHERNET_TAG route
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet')
-rw-r--r-- | packet/bgp.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index 4301d7c1..bdd07911 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -797,7 +797,7 @@ func NewRouteDistinguisherIPAddressAS(admin string, assigned uint16) *RouteDisti DefaultRouteDistinguisher: DefaultRouteDistinguisher{ Type: BGP_RD_IPV4_ADDRESS, }, - Admin: net.ParseIP(admin), + Admin: net.ParseIP(admin).To4(), Assigned: assigned, } } @@ -3037,6 +3037,15 @@ func (e *TwoOctetAsSpecificExtended) ToApiStruct() *api.ExtendedCommunity { } } +func NewTwoOctetAsSpecificExtended(as uint16, rt uint32, isTransitive bool) *TwoOctetAsSpecificExtended { + return &TwoOctetAsSpecificExtended{ + SubType: ExtendedCommunityAttrSubType(EC_SUBTYPE_ROUTE_TARGET), + AS: as, + LocalAdmin: rt, + IsTransitive: isTransitive, + } +} + type IPv4AddressSpecificExtended struct { SubType ExtendedCommunityAttrSubType IPv4 net.IP |