Change IP address from bytes to string per request from AP for DNS probe metrics

This commit is contained in:
Mike Hansen
2020-08-01 08:27:54 -04:00
parent 6d752a4468
commit 2f4be3f6c7
2 changed files with 2 additions and 2 deletions

View File

@@ -1264,7 +1264,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
}
try {
InetAddress ipAddress = InetAddress.getByAddress(dnsProbeMetricStats.getServerIP().toByteArray());
InetAddress ipAddress = InetAddress.getByName(dnsProbeMetricStats.getServerIP());
dnsProbeMetric.setDnsServerIp(ipAddress);
} catch (Exception e) {
LOG.error("Unable to get the DNS server IP.", e);

View File

@@ -803,7 +803,7 @@ public class OpensyncExternalIntegrationCloudTest {
InetAddress ip = InetAddress.getByName("192.168.1.1");
DNSProbeMetric dnsProbeMetric = DNSProbeMetric.getDefaultInstance().toBuilder().setLatency(10)
.setState(StateUpDown.SUD_up).setServerIP(ByteString.copyFrom(ip.getAddress())).build();
.setState(StateUpDown.SUD_up).setServerIP(ip.toString()).build();
RADIUSMetrics radiusProbeMetric = RADIUSMetrics.getDefaultInstance().toBuilder().setLatencyAve(10).build();
VLANMetrics vlanMetrics = VLANMetrics.getDefaultInstance().toBuilder().setDhcpLatency(10)
.setDhcpState(StateUpDown.SUD_up).setVlanIF("vlan-1").setObsV200RadiusLatency(15)