ONOS-3481 Fix bug of setting tunnel dst ip.
Change-Id: I979587077d35b72bf54b1b8794f34eb214fc0ff3
diff --git a/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbTunnelConfig.java b/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbTunnelConfig.java
index a32553a..ad90ca4 100644
--- a/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbTunnelConfig.java
+++ b/drivers/src/main/java/org/onosproject/driver/ovsdb/OvsdbTunnelConfig.java
@@ -68,10 +68,10 @@
public boolean createTunnelInterface(BridgeName bridgeName, TunnelDescription tunnel) {
Map<String, String> options = ((DefaultAnnotations) tunnel.annotations()).asMap();
if (tunnel.src() != null) {
- options.put(OPTION_LOCAL_IP, tunnel.src().toString());
+ options.put(OPTION_LOCAL_IP, ((IpTunnelEndPoint) tunnel.src()).ip().toString());
}
if (tunnel.dst() != null) {
- options.put(OPTION_REMOTE_IP, tunnel.dst().toString());
+ options.put(OPTION_REMOTE_IP, ((IpTunnelEndPoint) tunnel.dst()).ip().toString());
}
DriverHandler handler = handler();