summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/RemoteMappingCustomizer.java
diff options
context:
space:
mode:
authorJan Srnicek <jsrnicek@cisco.com>2016-09-21 15:02:12 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-09-21 13:38:13 +0000
commit9f7328169d65529de3fb1ed75872a081e4dc2184 (patch)
treebf556f170aadedba740dc1eee58441e21725bbe5 /lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/RemoteMappingCustomizer.java
parent5cfbc703cbf0183b76fb9d8157ffb860f429ec26 (diff)
Fixed reading of operational state of lisp
Rejecting of empty locator-sets Added revert of searched key to match vpp address order Ignoring helper data returned by dumps Change-Id: I5ec74f48dc373099b5fe516553d769c20e4a98f8 Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/RemoteMappingCustomizer.java')
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/RemoteMappingCustomizer.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/RemoteMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/RemoteMappingCustomizer.java
index 6b41e2d91..a34fedd7f 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/RemoteMappingCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/RemoteMappingCustomizer.java
@@ -115,6 +115,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
.setEidType(EidConverter.getEidType(eid))
.setEid(EidConverter.getEidAsByteArray(eid))
.setPrefixLength(EidConverter.getPrefixLength(eid))
+ .setFilter(FilterType.REMOTE)
.build();
LOG.debug("Dumping data for LocalMappings(id={})", id);
@@ -158,10 +159,17 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
throws ReadFailedException {
checkState(id.firstKeyOf(VniTable.class) != null, "Parent VNI table not specified");
+ final int vni = id.firstKeyOf(VniTable.class).getVirtualNetworkIdentifier().intValue();
+
+ if (vni == 0) {
+ // ignoring default vni mapping
+ // its not relevant for us and we also don't store mapping for such eid's
+ // such mapping is used to create helper local mappings to process remote ones
+ return Collections.emptyList();
+ }
//requesting all remote with specific vni
final MappingsDumpParams dumpParams = new MappingsDumpParamsBuilder()
- .setVni(Long.valueOf(id.firstKeyOf(VniTable.class).getVirtualNetworkIdentifier()).intValue())
.setEidSet(QuantityType.ALL)
.setFilter(FilterType.REMOTE)
.build();
@@ -179,6 +187,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
return replyOptional.get()
.lispEidTableDetails
.stream()
+ .filter(a -> a.vni == vni)
.map(detail -> new RemoteMappingKey(
new MappingId(
remoteMappingContext.getId(