BIND delete rr, not increase serial

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

  1. pts0

    pts0 New Member

    Hallo,

    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 ?

    Thanks

    pts0
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

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

    pts0 New Member

    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"
    .$app->tform->getAuthSQL('r'));
    $soa_id = intval($_POST["zone"]);
    $serial = $app->validate_dns->increase_serial($soa["serial"]);
    $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id);
    }
    }

    $app->tform_actions->onDelete();

    but i missed something, still not working :(

    pts0
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    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:

    $app->uses('validate_dns);
     
  5. pts0

    pts0 New Member

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

    What the difference between : bind_dlz_plugin.inc and bind_plugin.inc plugin ? which one should i take ?

    pts0
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

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

Share This Page