summaryrefslogtreecommitdiffhomepage
path: root/packet
AgeCommit message (Collapse)Author
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-26packet: fix the reggression of commit ad706a62aba6c98c1a0a5ca39759e37c774d9775FUJITA Tomonori
ignore EXTENDED 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: do mandatory attribute check only when NLRI existsHiroshi Yokoi
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-16packet: add validator testcasesHiroshi Yokoi
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-01-16packet: add ValidateUpdateMsgHiroshi Yokoi
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-16add packet validatorHiroshi 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>
2015-01-04packet: fixed type in constant.go file nameBrent Salisbury
-fixed a quick typo, great project! Signed-off-by: Brent Salisbury <brent@socketplane.io> 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-12-23packet: define FSMStateFUJITA Tomonori
Then we can use stringer nicely. Now FSMstate shows nicely like: DEBU[0081] Peer (10.0.0.1) state changed from BGP_FSM_ACTIVE to BGP_FSM_OPENSENT Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-11-28add ASLen function to AsPathParamInterface and its structsHiroshi Yokoi
2014-11-25bgp: add some constatnsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
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: 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>
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>
2014-11-04packet add NewBGP*Message functionsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>