BGPCEP-706: Fix BGP Flowspec NumbericOphrand 47/65247/1
authorKevin Wang <kevixw@gmail.com>
Mon, 23 Oct 2017 21:05:27 +0000 (14:05 -0700)
committerClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Tue, 7 Nov 2017 06:42:15 +0000 (07:42 +0100)
commitaf95a6cab7c8b74a281cdc6c85eae4253871d123
tree7d65d3d92565ceb7c52373f2d75fa1e68f6f7881
parent8ba07f711a56e7da8d63cd06c45883a814199d6a
BGPCEP-706: Fix BGP Flowspec NumbericOphrand

Right now when serializing a NumbericOphrand, the "end-of-list"
bit is not properly set. The last entry in the ophrand list
should have this bit set according to RFC [1]. Otherwise the packet
will be in malformed format.
This patch fix BGP flowspec NumbericOphrand to set the "end-of-list"
field properly. When the serialization happens, the end-of-list
field will be set in runtime.

[1] https://tools.ietf.org/html/rfc5575

Change-Id: Ib8841360b47137dc0ec0f54c3ef156a298ba3c81
Signed-off-by: Kevin Wang <kevixw@gmail.com>
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FSDscpHandler.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FSIpv6FlowLabelHandler.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FSTcpFlagsHandler.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/AbstractFSFragmentHandler.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/AbstractNumericOperandParser.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/AbstractOperandParser.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/BitmaskOperandParser.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/NumericOneByteOperandParser.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/NumericTwoByteOperandParser.java
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/handlers/NumericOperandParserTest.java [new file with mode: 0644]