diff options
author | 2016-08-25 16:58:55 +0200 | |
---|---|---|
committer | 2016-08-26 12:39:27 +0200 | |
commit | a92df9b4a2c5488621f8e95a6b88fb126a375649 (patch) | |
tree | 227321c603471314930e64f25a255589f5862d18 /vpp-common/vpp-translate-utils/src/main/java/io/fd | |
parent | b257036c963d274e2bcee43adc309782e5ddeab5 (diff) |
HONEYCOMB-139: ietf-acl translation layer. IP4 L3 ACL support
Change-Id: I5e5af0d7609aa594790b35a387ec8701f1f6b6df
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vpp-common/vpp-translate-utils/src/main/java/io/fd')
-rw-r--r-- | vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TranslateUtils.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TranslateUtils.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TranslateUtils.java index 4ecf8ff91..0902064eb 100644 --- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TranslateUtils.java +++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/honeycomb/translate/v3po/util/TranslateUtils.java @@ -109,8 +109,12 @@ public final class TranslateUtils { * @return byte array with address bytes */ public static byte[] ipv4AddressNoZoneToArray(final Ipv4AddressNoZone ipv4Addr) { + return ipv4AddressNoZoneToArray(ipv4Addr.getValue()); + } + + public static byte[] ipv4AddressNoZoneToArray(final String ipv4Addr) { byte[] retval = new byte[4]; - String[] dots = ipv4Addr.getValue().split("\\."); + String[] dots = ipv4Addr.split("\\."); for (int d = 0; d < 4; d++) { retval[d] = (byte) (Short.parseShort(dots[d]) & 0xff); |