mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: vrf: enforce reserved table id range 1001-5000
Ticket: Reviewed By: Testing Done: Tested vrf-table id with valid and invalid table ids currently the reserved table id range is set to 1001-5000 and it comes from a policy file /var/lib/ifupdown2/policy.d/vrf.json
This commit is contained in:
@@ -429,13 +429,13 @@ class vrf(moduleBase):
|
|||||||
|
|
||||||
# XXX: If we decide to not allow vrf id usages out of
|
# XXX: If we decide to not allow vrf id usages out of
|
||||||
# the reserved ifupdown range, then uncomment this code.
|
# the reserved ifupdown range, then uncomment this code.
|
||||||
#else:
|
else:
|
||||||
# if (int(vrf_table) < self.vrf_table_id_start or
|
if (int(vrf_table) < self.vrf_table_id_start or
|
||||||
# int(vrf_table) > self.vrf_table_id_end):
|
int(vrf_table) > self.vrf_table_id_end):
|
||||||
# self.log_error('%s: vrf table id %s out of reserved range [%d,%d]'
|
self.log_error('%s: vrf table id %s out of reserved range [%d,%d]'
|
||||||
# %(ifaceobj.name, vrf_table,
|
%(ifaceobj.name, vrf_table,
|
||||||
# self.vrf_table_id_start,
|
self.vrf_table_id_start,
|
||||||
# self.vrf_table_id_end))
|
self.vrf_table_id_end))
|
||||||
try:
|
try:
|
||||||
self.ipcmd.link_create(ifaceobj.name, 'vrf',
|
self.ipcmd.link_create(ifaceobj.name, 'vrf',
|
||||||
{'table' : '%s' %vrf_table})
|
{'table' : '%s' %vrf_table})
|
||||||
|
Reference in New Issue
Block a user