summaryrefslogtreecommitdiffstats
path: root/nat/nat2vpp/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'nat/nat2vpp/src/main')
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java
index a3874482f..9075f4d0c 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/MappingEntryCustomizer.java
@@ -124,12 +124,12 @@ final class MappingEntryCustomizer implements Ipv4Translator, Ipv6Translator,
if (detail.addrOnly == 0) {
builder.setExternalSrcPort(new ExternalSrcPortBuilder()
.setPortType(new SinglePortNumberBuilder().setSinglePortNumber(new PortNumber(
- (int) detail.externalPort))
+ Short.toUnsignedInt(detail.externalPort)))
.build())
.build());
builder.setInternalSrcPort(new InternalSrcPortBuilder()
.setPortType(new SinglePortNumberBuilder().setSinglePortNumber(new PortNumber(
- (int) detail.localPort))
+ Short.toUnsignedInt(detail.localPort)))
.build())
.build());
}
@@ -151,12 +151,12 @@ final class MappingEntryCustomizer implements Ipv4Translator, Ipv6Translator,
builder.setExternalSrcPort(new ExternalSrcPortBuilder()
.setPortType(new SinglePortNumberBuilder().setSinglePortNumber(new PortNumber(
- (int) detail.oPort))
+ Short.toUnsignedInt(detail.oPort)))
.build())
.build());
builder.setInternalSrcPort(new InternalSrcPortBuilder()
.setPortType(new SinglePortNumberBuilder().setSinglePortNumber(new PortNumber(
- (int) detail.iPort))
+ Short.toUnsignedInt(detail.iPort)))
.build())
.build());
}