From 31c95db0e5a2dfeb3bcee7f8c6b9a40b7807ad2c Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Thu, 25 Aug 2016 16:58:55 +0200 Subject: HONEYCOMB-139: ietf-acl translation layer. IP4 L3 ACL support Change-Id: I5e5af0d7609aa594790b35a387ec8701f1f6b6df Signed-off-by: Marek Gradzki --- .../java/io/fd/honeycomb/translate/v3po/util/TranslateUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vpp-common') 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); -- cgit 1.2.3-korg