NSX|V3+P: Prevent IPv6 default router creation as static route
Change-Id: Ie452cf316896b27396fae24989b67aa94947336d
This commit is contained in:
parent
3d057c1a47
commit
9d03a6e8fb
@ -359,7 +359,8 @@ class NsxPluginBase(db_base_plugin_v2.NeutronDbPluginV2,
|
|||||||
context, router_id, routes)
|
context, router_id, routes)
|
||||||
# do not allow adding a default route. NSX-v/v3 don't support it
|
# do not allow adding a default route. NSX-v/v3 don't support it
|
||||||
for route in routes:
|
for route in routes:
|
||||||
if route.get('destination', '').startswith('0.0.0.0/'):
|
if (route.get('destination', '').startswith('0.0.0.0/') or
|
||||||
|
route.get('destination', '').startswith('::/')):
|
||||||
msg = _("Cannot set a default route using static routes")
|
msg = _("Cannot set a default route using static routes")
|
||||||
raise n_exc.BadRequest(resource='router', msg=msg)
|
raise n_exc.BadRequest(resource='router', msg=msg)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user