BIND delete rr, not increase serial

Discussion in 'Developers' Forum' started by pts0, Apr 15, 2010.

  1. pts0

    pts0 HowtoForge Supporter


    I migrate sucessfully from myDns to BIND. Great stuff, if work like charm.
    Now i still have a problem, when modify a zone and add entries (A, CNAME and so on) all work perfectly, notify and update of slave bind. If i delete, record is delete from zone but serial is not updated, so slave don't sync.
    Can somebody give me a hint where should i modify ?


  2. till

    till Super Moderator

    I guess you will have to modify the file /usr/local/ispconfig/interface/web/dns/dns_rr_del.php
  3. pts0

    pts0 HowtoForge Supporter

    i tried to add :

    class page_action extends tform_actions {

    function onAfterDelete() {
    global $app, $conf;
    //* Update the serial number of the SOA record
    $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = '".intval($this->dataRecord["zone"])."' AND"
    $soa_id = intval($_POST["zone"]);
    $serial = $app->validate_dns->increase_serial($soa["serial"]);
    $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id);


    but i missed something, still not working :(

  4. till

    till Super Moderator

    Looks mostly ok. But I dont think that you have a post parameter 'zone' here, so

    $soa_id = intval($_POST["zone"]);

    should be:

    $soa_id = intval($this->dataRecord["zone"]);

    Additionally, I dont know if the validate_dns library is loaded, you might want to add right after the global statement something like:

  5. pts0

    pts0 HowtoForge Supporter

    still don't work, will check/debug in the night ;).

    What the difference between : and plugin ? which one should i take ?

  6. till

    till Super Moderator

    The dlz plugin is for bind-dlz. You should use plugin.

Share This Page