mirror of https://github.com/apache/cloudstack.git
Python exception processing static routes fixed (#11967)
This commit is contained in:
parent
d5165183ea
commit
de1b1d24c2
|
|
@ -603,7 +603,7 @@ class CsIP:
|
||||||
if item == "id":
|
if item == "id":
|
||||||
continue
|
continue
|
||||||
static_route = static_routes.get_bag()[item]
|
static_route = static_routes.get_bag()[item]
|
||||||
if static_route['ip_address'] == self.address['public_ip'] and not static_route['revoke']:
|
if 'ip_address' in static_route and static_route['ip_address'] == self.address['public_ip'] and not static_route['revoke']:
|
||||||
self.fw.append(["mangle", "",
|
self.fw.append(["mangle", "",
|
||||||
"-A PREROUTING -m state --state NEW -i %s -s %s ! -d %s/32 -j ACL_OUTBOUND_%s" %
|
"-A PREROUTING -m state --state NEW -i %s -s %s ! -d %s/32 -j ACL_OUTBOUND_%s" %
|
||||||
(self.dev, static_route['network'], static_route['ip_address'], self.dev)])
|
(self.dev, static_route['network'], static_route['ip_address'], self.dev)])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue