fix for gretap interfaces giving bad values to netclient

This commit is contained in:
bharnden 2019-10-12 08:10:30 -07:00
parent fee56302a1
commit eb248291a5

View file

@ -460,9 +460,13 @@ class GreTap(CoreInterface):
if remoteip is None:
raise ValueError("missing remote IP required for GRE TAP device")
self.net_client.create_gretap(
self.localname, str(remoteip), str(localip), str(ttl), str(key)
)
if localip is not None:
localip = str(localip)
if ttl is not None:
ttl = str(ttl)
if key is not None:
key = str(key)
self.net_client.create_gretap(self.localname, str(remoteip), localip, ttl, key)
self.net_client.device_up(self.localname)
self.up = True