summaryrefslogtreecommitdiffstats
path: root/routing
diff options
context:
space:
mode:
Diffstat (limited to 'routing')
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java
index a58051b63..abb48618c 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java
@@ -60,7 +60,7 @@ public final class Ipv6RouteNamesFactory implements RouteMapper {
public String uniqueRouteName(@Nonnull final Ip6FibDetails details, @Nonnull final MappingContext mappingContext) {
return bindName(routingProtocolContext.getName(details.tableId, mappingContext),
doubleDotlessAddress(details.address),
- String.valueOf(details.addressLength));
+ String.valueOf(Byte.toUnsignedInt(details.addressLength)));
}
public String uniqueRouteHopName(
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
index 80b4b8f79..97adb3589 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/trait/RouteRequestProducer.java
@@ -63,7 +63,7 @@ public interface RouteRequestProducer extends ByteDataTranslator, AddressTransla
checkArgument(
allowedPrefixPatterns.stream().anyMatch(pattern -> Pattern.compile(pattern).matcher(value).matches()),
"%s is not a valid Ip-prefix value");
- return Byte.valueOf(value.substring(value.indexOf("/") + 1));
+ return Integer.valueOf(value.substring(value.indexOf("/") + 1)).byteValue();
}
default boolean classifyTablePresent(final String classifyTableName,