summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
AgeCommit message (Collapse)Author
2015-03-21packet: fix EVPN route family NlriYuji Oshima
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-20peer: update pathattr for non-route-server clientISHIDA Wataru
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-12packet: add EVPN NLRI parser and serializerFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-08server: support multiple route familes per peerFUJITA Tomonori
You can configure like the following: [Global] As = 65032 RouterId = "192.168.255.1" [[NeighborList]] NeighborAddress = "10.0.255.1" PeerAs = 65001 [NeighborList.RouteServer] RouteServerClient = true [[NeighborList.AfiSafiList]] AfiSafiName = "ipv4-unicast" [[NeighborList.AfiSafiList]] AfiSafiName = "ipv6-unicast" Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-06server: check route refresh afi and safiFUJITA Tomonori
If it's not valid, log a warning and ignore. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-03-05config: validate route family configuraitonFUJITA Tomonori
If not specified, use the same AFI with peer IP address as a default. To avoid circular import, define BGP_ORIGIN_ATTR_TYPE consts bgp.go Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-16packet: fix AS4PathParam parser type conversionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-16packet: cleanup IPAddressPrefix type conversionFUJITA Tomonori
Looks Harmless though. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-02-16server: check the bgp message length before sendingFUJITA Tomonori
if the length is over 4096, the message will be dropped. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-29packet: fix up error messageFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-29packet: fix as_path parserFUJITA Tomonori
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-25packet: check Header.LenFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-25packet: malformed aspath returns Notificaiton with dataFUJITA Tomonori
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-24packet: fix PathAttributeMpReachNLRI's Serialize()FUJITA Tomonori
len(p.Valu) could be zero. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-23packet: fix length check about type conversionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-23packet: fix PathAttributeMpReachNLRI's DecodeFromBytesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-16server: handle over 4096 byte size messageFUJITA Tomonori
send notification. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-16packet: add functions to get PathAttribute flags and TypeHiroshi Yokoi
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-16packet: handle malformed BGP HeaderFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-15packet: check routefamily in MP_REACH/UNREACH attributesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-14server: close the connection after sending notificationFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-12packet: validate path attributesFUJITA Tomonori
Handles gracefully malformed messages. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-12packet: define pathAttrFlags mapHiroshi Yokoi
Use this later for functions to validate update messages. 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-11packet: rename PacketParseError to MessageErrorFUJITA Tomonori
Handle not only parsing error. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-11packet: add data length check and notificationHiroshi Yokoi
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>
2015-01-09packet: fix extendedcommunities Serialize()FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-07table: fix UpdatePathAttrs2ByteASFUJITA Tomonori
Fix the bug that UpdatePathAttrs2ByteAS modifies the _ORIGINAL_ path attributes in rib. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-06table: fix rib presentationFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-06packet: set optional bit in AS4_PATHFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-06packet: fix AS_PATH JSON marshalFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-05cli: improve rib presentationFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-31server: handle peer not capable of four byte AS numberFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-27packet: BGPCapabiltyCode cleanupFUJITA Tomonori
use stringer command. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-27RouteFamily cleanupFUJITA Tomonori
RouteFamily is defined in two files. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-26packet: improve PathAttributeCommunities JSON output againFUJITA Tomonori
use decimal. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-25packet: improve PathAttributeCommunities JSON outputFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-25packet: support pretty PathAttribute JSON printingFUJITA Tomonori
some are missing though. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-12-25packet: define BGPPathAttr typeFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-28add ASLen function to AsPathParamInterface and its structsHiroshi Yokoi
2014-11-16packet: add helper functions for bgp speakerFUJITA Tomonori
The helper functions allows bgp speaker to easily read a header from a socket, get the body length, read the body data, and parse it. 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-04packet: add NewNLRInfo functionFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-04packet add NewCap* functionsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>