diff --git a/bind8/CHANGELOG b/bind8/CHANGELOG index 1a7a14e29..3999bcc2e 100644 --- a/bind8/CHANGELOG +++ b/bind8/CHANGELOG @@ -106,3 +106,4 @@ When adding a master zone with automatically created slaves, add an also-notify ---- Changes since 1.480 ---- Added mass record change and creation buttons to the zone search results page. Made the manual config file editor textboxes full-width. +Fixed a bug that cause blocks like sortlist not be parsed properly, and possible cause Webmin to corrupt other parts of the named.conf file. diff --git a/bind8/bind8-lib.pl b/bind8/bind8-lib.pl index 5c1ab9cec..99e222cd9 100644 --- a/bind8/bind8-lib.pl +++ b/bind8/bind8-lib.pl @@ -197,8 +197,15 @@ sub parse_struct { local (%str, $i, $j, $t, @vals); $i = ${$_[2]}; -$str{'name'} = lc($_[0]->[$i]); $str{'line'} = $_[1]->[$i]; +if ($_[0]->[$i] ne '{') { + # Has a name + $str{'name'} = lc($_[0]->[$i]); + } +else { + # No name, so need to move token pointer back one + $i--; + } $str{'index'} = $_[3]; $str{'file'} = $_[4]; if ($str{'name'} eq 'inet') {