summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDenis Shevchenko <shevchenko_d@bifit.com>2017-05-11 22:13:38 +0300
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-05-23 14:30:33 +0900
commit2922f6e7f8ad76e118a9eaa9de248ce5022fa4b0 (patch)
treebdac2f7c49de078034fe90380c83cdeb49b0a2eb
parent87fe4fa604fff41c4d930f128e91a58c0fa1ead4 (diff)
flowspec: correct place for & bit in opflags
-rw-r--r--packet/bgp/bgp.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go
index 1879d1f0..b7470529 100644
--- a/packet/bgp/bgp.go
+++ b/packet/bgp/bgp.go
@@ -2742,11 +2742,10 @@ func parseDecValuesCmd(myCmd string, validationFunc func(int) error) ([][2]int,
}
case DECLogicOpNameMap[DEC_LOGIC_OP_AND], DECLogicOpNameMap[DEC_LOGIC_OP_OR]:
if bit := DECLogicOpValueMap[myCmdChar]; bit&DECLogicOp(operatorValue[0]) == 0 {
+ decOperatorsAndValues = append(decOperatorsAndValues, operatorValue)
if myCmdChar == DECLogicOpNameMap[DEC_LOGIC_OP_AND] {
- operatorValue[0] |= int(bit)
+ operatorValue[0] = int(bit)
}
- decOperatorsAndValues = append(decOperatorsAndValues, operatorValue)
- operatorValue[0] = 0
operatorValue[1] = 0
index++
} else {