summaryrefslogtreecommitdiffstats
path: root/lisp/lisp2vpp/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/lisp2vpp/src/main/java')
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java4
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/util/EidTranslator.java20
3 files changed, 13 insertions, 13 deletions
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java
index cf6ca8b83..c2a7f0bd8 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java
@@ -87,7 +87,7 @@ public class MapResolverCustomizer extends FutureJVppCustomizer
final LispMapResolverDetails mapResolverDetails =
dumpOptional.get().lispMapResolverDetails.stream()
.filter(a -> addressesEqual(key.getIpAddress(),
- arrayToIpAddressReversed(byteToBoolean(a.isIpv6), a.ipAddress)))
+ arrayToIpAddress(byteToBoolean(a.isIpv6), a.ipAddress)))
.collect(RWUtils.singleItemCollector());
builder.setKey(key);
@@ -115,7 +115,7 @@ public class MapResolverCustomizer extends FutureJVppCustomizer
return dumpOptional.get().lispMapResolverDetails.stream()
.map(resolver -> new MapResolverKey(
- arrayToIpAddressReversed(byteToBoolean(resolver.isIpv6), resolver.ipAddress)))
+ arrayToIpAddress(byteToBoolean(resolver.isIpv6), resolver.ipAddress)))
.collect(Collectors.toList());
}
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java
index 3b00d2800..27b51218c 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java
@@ -292,7 +292,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer
}
private Locator detailsToLocator(final LispLocatorDetails details) {
- final IpAddress address = arrayToIpAddressReversed(byteToBoolean(details.isIpv6), details.ipAddress);
+ final IpAddress address = arrayToIpAddress(byteToBoolean(details.isIpv6), details.ipAddress);
return new LocatorBuilder()
.setAddress(address)
.setKey(new LocatorKey(address))
diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/util/EidTranslator.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/util/EidTranslator.java
index 347720958..3110faf07 100755
--- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/util/EidTranslator.java
+++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/util/EidTranslator.java
@@ -92,12 +92,12 @@ public interface EidTranslator extends AddressTranslator, EidMetadataProvider {
switch (type) {
case IPV4: {
return newLocalEidBuilder(Ipv4Afi.class, vni).setAddress(
- new Ipv4Builder().setIpv4(arrayToIpv4AddressNoZoneReversed(address)).build())
+ new Ipv4Builder().setIpv4(arrayToIpv4AddressNoZone(address)).build())
.build();
}
case IPV6: {
return newLocalEidBuilder(Ipv6Afi.class, vni).setAddress(
- new Ipv6Builder().setIpv6(arrayToIpv6AddressNoZoneReversed(address)).build())
+ new Ipv6Builder().setIpv6(arrayToIpv6AddressNoZone(address)).build())
.build();
}
case MAC: {
@@ -118,14 +118,14 @@ public interface EidTranslator extends AddressTranslator, EidMetadataProvider {
case IPV4: {
return newRemoteEidBuilder(Ipv4Afi.class, vni)
.setAddress(
- new Ipv4Builder().setIpv4(arrayToIpv4AddressNoZoneReversed(address))
+ new Ipv4Builder().setIpv4(arrayToIpv4AddressNoZone(address))
.build())
.build();
}
case IPV6: {
return newRemoteEidBuilder(Ipv6Afi.class, vni)
.setAddress(
- new Ipv6Builder().setIpv6(arrayToIpv6AddressNoZoneReversed(address))
+ new Ipv6Builder().setIpv6(arrayToIpv6AddressNoZone(address))
.build())
.build();
}
@@ -146,14 +146,14 @@ public interface EidTranslator extends AddressTranslator, EidMetadataProvider {
case IPV4: {
return newEidBuilderLocal(Ipv4Afi.class, vni)
.setAddress(
- new Ipv4Builder().setIpv4(arrayToIpv4AddressNoZoneReversed(address))
+ new Ipv4Builder().setIpv4(arrayToIpv4AddressNoZone(address))
.build())
.build();
}
case IPV6: {
return newEidBuilderLocal(Ipv6Afi.class, vni)
.setAddress(
- new Ipv6Builder().setIpv6(arrayToIpv6AddressNoZoneReversed(address))
+ new Ipv6Builder().setIpv6(arrayToIpv6AddressNoZone(address))
.build())
.build();
}
@@ -174,14 +174,14 @@ public interface EidTranslator extends AddressTranslator, EidMetadataProvider {
case IPV4: {
return newEidBuilderRemote(Ipv4Afi.class, vni)
.setAddress(
- new Ipv4Builder().setIpv4(arrayToIpv4AddressNoZoneReversed(address))
+ new Ipv4Builder().setIpv4(arrayToIpv4AddressNoZone(address))
.build())
.build();
}
case IPV6: {
return newEidBuilderRemote(Ipv6Afi.class, vni)
.setAddress(
- new Ipv6Builder().setIpv6(arrayToIpv6AddressNoZoneReversed(address))
+ new Ipv6Builder().setIpv6(arrayToIpv6AddressNoZone(address))
.build())
.build();
}
@@ -201,10 +201,10 @@ public interface EidTranslator extends AddressTranslator, EidMetadataProvider {
EidType type, byte[] address) {
switch (type) {
case IPV4: {
- return arrayToIpv4AddressNoZoneReversed(address).getValue();
+ return arrayToIpv4AddressNoZone(address).getValue();
}
case IPV6: {
- return arrayToIpv6AddressNoZoneReversed(address).getValue();
+ return arrayToIpv6AddressNoZone(address).getValue();
}
case MAC: {
//as wrong as it looks ,its right(second param is not end index,but count)