mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Allow "transfer-source" to be specified so slave zones within the views can match the correct view on the master.
This commit is contained in:
@@ -44,6 +44,9 @@ print &address_input($text{'master_query'}, "allow-query", $vconf);
|
||||
print &address_input($text{'master_notify2'}, "also-notify", $vconf);
|
||||
print &address_input($text{'master_notify3'}, "allow-notify", $vconf);
|
||||
|
||||
$src = &find("transfer-source", $vconf);
|
||||
print &ui_table_row($text{'net_taddr'}, &ui_textbox("transfer-source", $src->{'values'}->[0], 15));
|
||||
|
||||
print &ui_table_end();
|
||||
|
||||
if ($access{'ro'}) {
|
||||
|
||||
@@ -20,6 +20,23 @@ $access{'ro'} && &error($text{'view_ecannot'});
|
||||
&save_address("allow-query", $view, 1);
|
||||
&save_address("also-notify", $view, 1);
|
||||
&save_address("allow-notify", $view, 1);
|
||||
|
||||
if ($in{'transfer-source'})
|
||||
{
|
||||
&check_ipaddress($in{'transfer-source'}) || &error(&text('net_eaddr', $in{'transfer-source'}));
|
||||
push(@tvals, $in{'transfer-source'});
|
||||
if (@tvals)
|
||||
{
|
||||
&save_directive($view, 'transfer-source',
|
||||
[ { 'name' => 'transfer-source',
|
||||
'values' => \@tvals } ], 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
&save_directive($view, 'transfer-source', [], 1);
|
||||
}
|
||||
|
||||
&flush_file_lines();
|
||||
&unlock_file(&make_chroot($view->{'file'}));
|
||||
&webmin_log("view", undef, $view->{'value'}, \%in);
|
||||
|
||||
Reference in New Issue
Block a user