summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io/fd/honeycomb
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-05-26 14:52:20 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-05-30 07:20:40 +0200
commit3c15fa224a914aa9e03ae2e97fab1e740a0f8b04 (patch)
treeb3b93894ac36b4d143f10337421777a7cfb78ef3 /v3po/v3po2vpp/src/main/java/io/fd/honeycomb
parentfc4f291590e29f7d576793041ece4081d28c0027 (diff)
Fix vlan type handling for sub interfaces and vlan-tag-rewrite operation
Change-Id: I932fb63932d9c53acc6317fa77cc0683faf47081 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/SubInterfaceCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizer.java
index 17342e347..499d98048 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/SubInterfaceCustomizer.java
@@ -116,7 +116,7 @@ public class SubInterfaceCustomizer extends AbstractInterfaceTypeCustomizer<SubI
request.twoTags = 1;
break;
}
- request.dot1Ad = booleanToByte(VlanType._802dot1q.equals(subInterface.getVlanType()));
+ request.dot1Ad = booleanToByte(VlanType._802dot1ad.equals(subInterface.getVlanType()));
request.exactMatch = booleanToByte(subInterface.isExactMatch());
request.defaultSub = booleanToByte(subInterface.isDefaultSubif());
request.outerVlanIdAny = booleanToByte(subInterface.isMatchAnyInnerId());
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/SubInterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/SubInterfaceCustomizer.java
index ebd1cff40..45ef0b490 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/SubInterfaceCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/SubInterfaceCustomizer.java
@@ -92,7 +92,7 @@ public class SubInterfaceCustomizer extends FutureJVppCustomizer
builder.setIdentifier(Long.valueOf(iface.subId));
builder.setSuperInterface(interfaceContext.getName(iface.supSwIfIndex, ctx.getMappingContext()));
builder.setNumberOfTags(Short.valueOf(iface.subNumberOfTags));
- builder.setVlanType(iface.subDot1Ad == 1 ? VlanType._802dot1q : VlanType._802dot1ad);
+ builder.setVlanType(iface.subDot1Ad == 1 ? VlanType._802dot1ad : VlanType._802dot1q);
if (iface.subExactMatch == 1) {
builder.setExactMatch(true);
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java
index e6b8b36fc..20429253f 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/VlanTagRewriteCustomizer.java
@@ -84,7 +84,7 @@ public class VlanTagRewriteCustomizer extends FutureJVppCustomizer
return;
}
- builder.setFirstPushed(iface.subDot1Ad == 1 ? VlanType._802dot1q : VlanType._802dot1ad);
+ builder.setFirstPushed(iface.vtrPushDot1Q == 1 ? VlanType._802dot1q : VlanType._802dot1ad);
builder.setRewriteOperation(TagRewriteOperation.forValue(iface.vtrOp));
if (iface.vtrTag1 != 0) {
builder.setTag1(new VlanTag(iface.vtrTag1));