Bug #1887 ยป axfrdns.patch
tinydns.inc 2011-09-19 13:33:18.000000000 -0600 | ||
---|---|---|
228 | 228 |
if(is_array($ztipaddress)) { |
229 | 229 |
exec("/usr/local/bin/axfrdns-conf Gaxfrdns Gdnslog {$g['varetc_path']}/axfrdns {$g['varetc_path']}/tinydns {$dnsserverip}"); |
230 | 230 |
exec("/bin/ln -s {$g['varetc_path']}/axfrdns {$g['varrun_path']}/service/"); |
231 |
tinydns_setup_axfrdns(); |
|
231 | 232 |
} |
232 | 233 | |
233 | 234 |
exec("echo {$dnsserverip} > {$g['varetc_path']}/tinydns/env/IP"); |
... | ... | |
307 | 308 |
log_error("Could not open {$g['varetc_path']}/axfrdns/tcp for writing"); |
308 | 309 |
return; |
309 | 310 |
} |
311 | ||
312 |
// Add a default deny rule |
|
313 |
fwrite($fd, ":deny\n"); |
|
314 | ||
310 | 315 |
foreach($ztipaddress as $zt) { |
311 | 316 |
if($zt['ztipaddress'] && $zt['dnszone']) |
312 | 317 |
$zonet = "{$zt['ztipaddress']}:allow"; |
313 | 318 |
if($zt['dnszone'] <> "*") |
314 | 319 |
$zonet .= ",AXFR=\"{$zt['dnszone']}\""; |
315 |
fwrite($fd, $zone . "\n"); |
|
320 |
fwrite($fd, $zonet . "\n");
|
|
316 | 321 |
} |
317 | 322 |
fclose($fd); |
318 | 323 |
// Recompile database |
319 |
exec("cd {$g['varrun_path']}/service/axfrdns && /usr/local/bin/tinydns-data");
|
|
324 |
exec("cd {$g['varrun_path']}/service/axfrdns && /usr/local/bin/tcprules tcp.cdb tcp.tmp < {$g['varetc_path']}/axfrdns/tcp");
|
|
320 | 325 |
} |
321 | 326 | |
322 | 327 |
function tinydns_get_record_status($record, $pingthreshold = "", $wanpingthreshold = "") { |