summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp_test.go
AgeCommit message (Collapse)Author
2015-10-09packet: add aigp path attribute serializer/decoderISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-09-16packet: support draft-ietf-idr-flow-spec-v6-06ISHIDA Wataru
you can add ipv6 flowspec routes like below $ gobgp global rib add match destination 2001::/64 10 label '=200' then discard -a ipv6-flowspec $ gobgp global rib -a ipv6-flowspec Network Next Hop AS_PATH Age Attrs *> [destination:2001::/64/10][label: =200] fictitious 00:00:23 [{Origin: i} {Extcomms: [discard]}] scenario_test is also added Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-09-08packet: add ADD_PATH capabilityISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-09-08api: kill api.CapabilityISHIDA Wataru
keep protobuf structures simple Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-09-08*: kill bgp.NLRInfo and bgp.WithdrawnRouteISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-08-12bgp/cli: support flowspec (RFC5575)ISHIDA Wataru
draft-ietf-idr-flowspec-redirect-rt-bis-05 is also implmented. TODO: draft-ietf-idr-flow-spec-v6-06 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-08-08server: support vrfISHIDA Wataru
to add/delete vrf $ gobgp vrf [add|del] <vrf-name> rd <rd> rt [import|export|both] <rt>... show vrf $ gobgp vrf to add/delete a path to a specific vrf $ gobgp vrf <vrf-name> rib [add|del] <prefix> -a <address-family> show paths contained in a specific vrf $ gobgp vrf <vrf-name> rib -a <address-family> Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-08-05packet: add helper function to create RT structISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-08-05api/packet: add evpn extended community structsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-12packet: use reflect.DeepEqual() for unit testsFUJITA Tomonori
This fixes the problem that the current unit tests don't guarantee that DecodeFromBytes() properly parses the data generated by Serialize(). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-05packet: fix bug of not taking care of withdrawn labelISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-05server/cli: support add/delete vpnv4/vpnv6 routesISHIDA Wataru
$ gobgp global rib add 1:10.0.0.1:1000:10.0.0.0/24 -a vpnv4 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-07-01packet: give better name and comments for label structISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: make getPathAttribute publicISHIDA Wataru
we use this function later in mrt code Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-20packet: gofmtISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-06-02packet: return aspath length based on the segment type.Hiroshi Yokoi
2015-05-01bgp: fix bug of route target membershop nlriISHIDA Wataru
RFC4760 says NLRI Encoding is encoded as 2-tuples of the form <length, prefix> this patch adds Length fields to the RouteTargetMembershopNLRI Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-25table: add support for encapsulation nlriISHIDA Wataru
add encap end point route(10.0.0.1) with vni 20 $ gobgp global rib add 10.0.0.1 20 -a encap check it $ gobgp global rib -a encap Please specify one command of: add or del Network Next Hop AS_PATH Age Attrs *> 10.0.0.1 0.0.0.0 [64512] 00:00:01 [{Origin: IGP} {Encap: < VXLAN | color: 20 >}] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-25bgp: add RFC5512 related message serializer/decoderISHIDA Wataru
RFC5512 is for tunnel information exchange between peers. This is used in EVPN/VXLAN usecase(draft-ietf-bess-evpn-overlay-01). Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2015-04-09packet: fix EVPN MAC/IP Advertisement Route parserFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-04-09packet: fix EVPN parser/serializerFUJITA Tomonori
Also add unit test. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-28packet: add String() to RouteTargetMembershipNLRI and ExtendedCommunityInterfaceHiroshi Yokoi
2015-01-26packet: fix PathAttributeMpUnreachNLRI's DecodeFromBytesFUJITA Tomonori
return properly an error. Also check route family. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-26table: validate path attribute flagFUJITA Tomonori
BGP_ERROR_SUB_ATTRIBUTE_FLAGS_ERROR is preferred than BGP_ERROR_SUB_ATTRIBUTE_LENGTH_ERROR so after parsing a message then validating the flag does't work. With this patch, bmp doesn't parse a message having incorrect path attribute flag. It's not ideal so need to fix later. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-24packet: fix mpreach and unreach Serialize()FUJITA Tomonori
Fix the a bug that it crashes with empty NLRI. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-11packet: validate some attributesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-09table: fix tableKey()FUJITA Tomonori
tableKey() must use Prefix (address + mask) as key. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-06packet: add one 16bit AS test PathAttributeAggregatorFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-06packet: fix PathAttributeAggregatorFUJITA Tomonori
PathAttributeAggregator can handle both two-bytes and four-bytes AS number. So its serializer needs to know which way should be used. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-05packet: fix PathAttributeAsPathFUJITA Tomonori
PathAttributeAsPath can handle both two-bytes and four-bytes AS number. Thus, PathAttributeAsPath serializer needs to know which way should be used. This patch introduces As4PathParam. You can pass either of As4PathParam and AsPathParam struct to initialize PathAttributeAsPath struct. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-04add unit test for bgp message codeFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>