"nIP.getIpAddress().getBytes()" returns a byte representation of the
literal IP address string. The current method needs is a byte
representation of the IP address represented by the string.
The solution is to use the InetAddress.getByName method that takes an
IP address string directly.
Change-Id: I99dd335d433125af1d7d5a0b88e377d6a1bfd62f
Signed-off-by: Andre Fredette <afredette@redhat.com>
for (Neutron_IPs nIP : gatewayPort.getFixedIPs()) {
InetAddress ipAddress;
try {
- ipAddress = InetAddress.getByAddress(nIP.getIpAddress().getBytes());
+ ipAddress = InetAddress.getByName(nIP.getIpAddress());
} catch (UnknownHostException e) {
LOGGER.warn("unknown host exception {}", e);
continue;