Changeset 936 for trunk


Ignore:
Timestamp:
May 20, 2022, 5:25:39 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Generation of difference DHCP records on newer RouterOS.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigRouterOS/Generators/DHCP.php

    r887 r936  
    2828        $Name = $Interface['DeviceName'];
    2929        if ($Interface['Name'] != '') $Name .= '-'.$Interface['Name'];
    30         $Items[] = array('mac-address' => $Interface['MAC'], 'address' => $Interface['LocalIP'], 'server' => $Server, 'comment' => $Name, 'lease-time' => '1d');
     30        $Items[] = array('mac-address' => $Interface['MAC'], 'address' => $Interface['LocalIP'], 'server' => $Server, 'comment' => $Name, 'lease-time' => '1d00:00:00');
    3131      }
    3232
    33       print_r($Routerboard->ListUpdate($Path, array('mac-address', 'address', 'server', 'comment'), $Items, array('server' => $Server, 'dynamic' => 'no')));
     33      print_r($Routerboard->ListUpdate($Path, array('mac-address', 'address', 'server', 'comment', 'lease-time'), $Items, array('server' => $Server, 'dynamic' => 'no')));
    3434      echo("\n");
    3535    }
Note: See TracChangeset for help on using the changeset viewer.