1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Catch the interface long error during parsing

Ticket: CM-5882
Reviewed By:
Testing Done:
This commit is contained in:
Roopa Prabhu
2015-07-08 21:08:43 -07:00
parent 0f6dc7e67a
commit 9432c6717e
2 changed files with 4 additions and 13 deletions

View File

@@ -219,6 +219,10 @@ class networkInterfaces():
iface_attrs = re.split(self._ws_split_regex, iface_line)
ifacename = iface_attrs[1]
if utils.check_ifname_size_invalid(ifacename):
self._parse_warn(self._currentfile, lineno,
'%s: interface name too long' %ifacename)
# in cases where mako is unable to render the template
# or incorrectly renders it due to user template
# errors, we maybe left with interface names with