summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp/validate_test.go
AgeCommit message (Collapse)Author
2017-11-28packet/bgp: Use fixed len types in FlowSpec componentsIWASE Yusuke
Currently, the "FlowSpecComponentItem" uses int type for the "Op" and "Value" fields, but Golang int type has 4 bytes length on the 32-bit env and 8 bytes length on the 64-bit env. For example, to support the SNAP (Type 20) rule, which has 5 bytes value field, int type has not enough length on 32-bit env. This patch fixes to use the fixed length integer types for the FlowSpec components and avoid overflows of value range. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-24packet/bgp: Sort FlowSpec rules when decoding/creatingIWASE Yusuke
Currently, we sort the FlowSpec rules when creating a new path containing the FlowSpec NLRI and when parsing CLI arguments for the FlowSpec rules. This patch moves sorting the rules into the inside of the "packet" module and sorts them when decoding binary and creating new NLRI. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-20packet/bgp: Rename snake case to camel caseIWASE Yusuke
This patch renames some variable names in snake case (e.g., "last_byte_value") to that in the camel case (e.g., "lastByte") because Go prefers the camel case for variable names. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-11-07packet/bgp: Add Validation for BGP ConfederationsSatoshi Fujimoto
RFC 5065 says that: "It is a error for a BGP speaker to receive an update message from a confederation peer that is not in the same Member-AS that does not have AS_CONFED_SEQUENCE as the first segment." Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-09-29packet/bgp: Add Unit Tests for Revised Error HandlingSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-07-04support addpath recvISHIDA Wataru
2017-07-04packet: support addpath decoding/encodingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-10-27bgp: remove duplicate large communitiesWataru Ishida
closes #1143 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-06-13packet: export pathAttrFlagsFUJITA Tomonori
Used to check if an attribute is known or unknown. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-18packet/bgp: check flowspec nlri type orderingISHIDA Wataru
RFC5575 says, Flow specification components must follow strict type ordering. A given component type may or may not be present in the specification, but if present, it MUST precede any component of higher numeric type value. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-03-31move packet/*.go to packet/bgp/*.go for Go's conventionFUJITA Tomonori
Later, we move non-bgp protocol stuff like mrt under their own direcotries. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>