Project

General

Profile

Bug #400 ยป pfsense2.rfc2136.patch

Aarno Aukia, 03/04/2010 05:23 AM

View differences:

/etc/rc.dyndns.update 2010-03-04 11:03:19.000000000 +0100
38 38

  
39 39
$argument = trim($argv[1], " \n");
40 40

  
41
// update dyndns.org
41 42
if(empty($argument))
42 43
       services_dyndns_configure();
43 44
else
44 45
       services_dyndns_configure($argument);
45 46

  
47
// update rfc2136 dyndns
48
services_dnsupdate_process();
49

  
46 50
?>
47
-- /etc/inc/services.inc.bak   2010-03-04 10:58:48.000000000 +0100
51
++ /etc/inc/services.inc       2010-03-04 11:13:28.000000000 +0100
......
833 833
       /* Dynamic DNS updating active? */
834 834
       if (is_array($config['dnsupdates']['dnsupdate'])) {
835 835
               foreach ($config['dnsupdates']['dnsupdate'] as $i => $dnsupdate) {
836
                       if (!isset($dyndns['enable']))
836
                       if (!isset($dnsupdate['enable']))
837 837
                               continue;
838
                       if (!empty($int) && $int != $dyndns['interface'])
838
                       if (!empty($int) && $int != $dnsupdate['interface'])
839 839
                               continue;
840 840

  
841 841
                       /* determine interface name */
842
                       $if = get_real_interface($dyndns['interface']);
843
                       $wanip = get_interface_ip($dyndns['interface']);
842
                       $if = get_real_interface($dnsupdate['interface']);
843
                       $wanip = get_interface_ip($dnsupdate['interface']);
844 844
                       if ($wanip) {
845 845

  
846 846
                               $keyname = $dnsupdate['keyname'];
......
878 878
                                       $proto = 2;
879 879
                               }
880 880

  
881
                               $fd = fopen("{$g['varetc_path']}/K{$keyname}+157+00000.key", "w");
881
                               $fd = fopen("{$g['varetc_path']}/K{$i}{$keyname}+157+00000.key", "w");
882 882
                               fwrite($fd, "{$keyname} IN KEY {$flags} {$proto} 157 {$dnsupdate['keydata']}\n");
883 883
                               fclose($fd);
884 884

  
......
895 895
                               fclose($fd);
896 896

  
897 897
                               /* invoke nsupdate */
898
                               $cmd = "/usr/sbin/nsupdate -k {$g['varetc_path']}/K{$i}{$keyname}+157+00000.key";
898
                               $cmd = "/usr/bin/nsupdate -k {$g['varetc_path']}/K{$i}{$keyname}+157+00000.key";
899 899
                               if (isset($dnsupdate['usetcp']))
900 900
                                       $cmd .= " -v";
901 901
                               $cmd .= " {$g['varetc_path']}/nsupdatecmds{$i}";
......
1273 1273
       }
1274 1274
}
1275 1275

  
1276
?>
1276
?>
1277
-- /usr/local/www/services_rfc2136_edit.php.bak        2010-03-04 10:55:19.000000000 +0100
1277
++ /usr/local/www/services_rfc2136_edit.php    2010-03-04 10:55:43.000000000 +0100
......
81 81

  
82 82
       if (!$input_errors) {
83 83
               $rfc2136 = array();
84
               $rfc2136['enable'] = $_POST['enable'] ? false : true;
84
               $rfc2136['enable'] = $_POST['enable'] ? true : false;
85 85
               $rfc2136['host'] = $_POST['host'];
86 86
               $rfc2136['ttl'] = $_POST['ttl'];
87 87
               $rfc2136['keyname'] = $_POST['keyname'];
    (1-1/1)