summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-10-11 12:35:51 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-10-11 10:51:37 +0000
commit7fa476774566cce370c5a5e97b410746bc3b4484 (patch)
tree4a4f5cd88e12f1853f590c4386399c0486cd1ce1 /v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java
parent11e154ab3e09464086cad06376a5da25430cf48b (diff)
HONEYCOMB-258: fix protocol field translation in ACEs
It was translated to version field, but should be to protocol/next header field. Change-Id: I0cf23fdd43246bcc559f61d97701c9153e9b3607 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java')
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java30
1 files changed, 23 insertions, 7 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java
index 69fcf8d8c..1a7045529 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java
@@ -50,7 +50,7 @@ public class AceIp4WriterTest {
writer = new AceIp4Writer(jvpp);
action = new DenyBuilder().setDeny(true).build();
aceIp = new AceIpBuilder()
- .setProtocol((short) 4)
+ .setProtocol((short) 132)
.setDscp(new Dscp((short) 11))
.setAceIpVersion(new AceIpv4Builder()
.setSourceIpv4Network(new Ipv4Prefix("1.2.3.4/32"))
@@ -70,9 +70,17 @@ public class AceIp4WriterTest {
assertEquals(AceIp4Writer.TABLE_MEM_SIZE, request.memorySize);
byte[] expectedMask = new byte[] {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (byte) 0xf0, (byte) 0xfc,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1,
- -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ // L2:
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ // dscp:
+ (byte) 0x00, (byte) 0xfc,
+ // protocol:
+ 0, 0, 0, 0, 0, 0, 0, (byte) 0xff, 0, 0,
+ // source address:
+ -1, -1, -1, -1,
+ // destination address:
+ -1, -1, -1, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
if (isL2) {
@@ -90,9 +98,17 @@ public class AceIp4WriterTest {
assertEquals(0, request.hitNextIndex);
byte[] expectedMatch = new byte[] {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (byte) 0x40, (byte) 0x2c,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 1, 2,
- 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ // L2:
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ // dscp:
+ 0, (byte) 0x2c,
+ // protocol (132):
+ 0, 0, 0, 0, 0, 0, 0, (byte) 132, 0, 0,
+ // source address:
+ 1, 2, 3, 4,
+ // destination address:
+ 1, 2, 4, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
if (isL2) {