NSX|V3+P: Prevent IPv6 default router creation as static route
Change-Id: Ie452cf316896b27396fae24989b67aa94947336d
This commit is contained in:
parent
195132be41
commit
5f6814afbd
|
@ -359,7 +359,8 @@ class NsxPluginBase(db_base_plugin_v2.NeutronDbPluginV2,
|
|||
context, router_id, routes)
|
||||
# do not allow adding a default route. NSX-v/v3 don't support it
|
||||
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")
|
||||
raise n_exc.BadRequest(resource='router', msg=msg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue