Commit 66fa52fb authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(dhcpd/unbound) don't try to handle empty section, closes...

(dhcpd/unbound) don't try to handle empty section, closes https://github.com/opnsense/core/issues/1320

(cherry picked from commit 151e633d)
parent 5044756b
......@@ -96,7 +96,7 @@ class DHCPDLease(object):
if line:
if len(line) > 5 and line[0:5] == 'lease':
self._section_data.append(line)
elif len(line) > 1 and line[0] == '}':
elif len(line) > 1 and line[0] == '}' and len(self._section_data) > 0:
self._section_data.append(line)
yield self.parse_lease(self._section_data)
self._section_data = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment