Moving patching to the root of the repository.

The patches are mostly there for historical reasons.  They've been moved
away to make cleaning easier.  I think the applied patches should even be
removed.


git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@156 3873ddee-7413-0410-b6c4-c2c57c1ab35a
This commit is contained in:
wimpunk 2013-11-05 21:04:30 +00:00
parent b0e6b06188
commit aed1e51328
43 changed files with 0 additions and 1716 deletions

View file

@ -1,20 +0,0 @@
#
# patch created with `svn diff -r53 . > patches/3com-oc-remote812.patch`
# on Wed Jun 6 15:07:45 CEST 2007
# applied on r53
#
# This patch was send to me by The_Beast on IRC.
#
Index: ddclient
===================================================================
--- ddclient (revision 53)
+++ ddclient (working copy)
@@ -162,7 +162,7 @@
'3com-oc-remote812' => {
'name' => '3com OfficeConnect Remote 812',
'url' => '/callEvent',
- 'skip' => '.*IP address in use',
+ 'skip' => '.*LOCAL',
},
'e-tech' => {
'name' => 'E-tech Router',

View file

@ -1,169 +0,0 @@
# Added support for cisco ASA as a firewall
# 2891001 - Philip Gladstone
--- ddclient 2009-01-27 14:14:02.000000000 -0500
+++ /usr/sbin/ddclient 2009-11-02 18:26:02.000000000 -0500
@@ -283,6 +283,7 @@
'if' => ": obtain IP from the -if {interface}",
'cmd' => ": obtain IP from the -cmd {external-command}",
'cisco' => ": obtain IP from Cisco FW at the -fw {address}",
+ 'cisco-asa' => ": obtain IP from Cisco ASA at the -fw {address}",
map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw,
);
sub ip_strategies_usage {
@@ -728,7 +729,7 @@
$examined{$h} = 1;
my $use = $config{$h}{'use'} || opt('use');
local $opt{$use} = $config{$h}{$use} if $config{$h}{$use};
- my $ip = get_ip($use);
+ my $ip = get_ip($use, $h);
if (!defined $ip || !$ip) {
warning("unable to determine IP address")
if !$daemon || opt('verbose');
@@ -1481,6 +1482,8 @@
}
sub opt {
my $v = shift;
+ my $h = shift;
+ return $config{$h}{$v} if defined($h && $config{$h}{$v});
return $opt{$v} if defined $opt{$v};
return $globals{$v} if defined $globals{$v};
return default($v) if defined default($v);
@@ -1729,8 +1732,10 @@
my ($sd, $rq, $request, $reply);
debug("proxy = $proxy");
- debug("url = $url");
+ debug("url = %s", $url);
## canonify proxy and url
+ my $force_ssl;
+ $force_ssl = 1 if ($url =~ /^https:/);
$proxy =~ s%^https?://%%i;
$url =~ s%^https?://%%i;
$server = $url;
@@ -1743,7 +1748,7 @@
$globals{'fw'} && debug("glo fw = $globals{'fw'}");
#if ( $globals{'ssl'} and $server ne $globals{'fw'} ) {
## always omit SSL for connections to local router
- if ( $globals{'ssl'} and (caller(1))[3] ne 'main::get_ip' ) {
+ if ( $force_ssl || ($globals{'ssl'} and (caller(1))[3] ne 'main::get_ip') ) {
$use_ssl = 1;
$default_port = 443;
load_ssl_support;
@@ -1781,7 +1786,7 @@
$0 = sprintf("%s - connecting to %s port %s", $program, $peer, $port);
if (! opt('exec')) {
debug("skipped network connection");
- verbose("SENDING:", $request);
+ verbose("SENDING:", "%s", $request);
} elsif ($use_ssl) {
$sd = IO::Socket::SSL->new(
PeerAddr => $peer,
@@ -1805,7 +1810,7 @@
if (defined $sd) {
## send the request to the http server
verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP');
- verbose("SENDING:", $request);
+ verbose("SENDING:", "%s", $request);
$0 = sprintf("%s - sending to %s port %s", $program, $peer, $port);
my $result = syswrite $sd, $rq;
@@ -1855,28 +1860,29 @@
######################################################################
sub get_ip {
my $use = lc shift;
+ my $h = shift;
my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use), '');
$arg = '' unless $arg;
if ($use eq 'ip') {
- $ip = opt('ip');
+ $ip = opt('ip', $h);
$arg = 'ip';
} elsif ($use eq 'if') {
- $skip = opt('if-skip') || '';
+ $skip = opt('if-skip', $h) || '';
$reply = `ifconfig $arg 2> /dev/null`;
$reply = '' if $?;
} elsif ($use eq 'cmd') {
if ($arg) {
- $skip = opt('cmd-skip') || '';
+ $skip = opt('cmd-skip', $h) || '';
$reply = `$arg`;
$reply = '' if $?;
}
} elsif ($use eq 'web') {
- $url = opt('web') || '';
- $skip = opt('web-skip') || '';
+ $url = opt('web', $h) || '';
+ $skip = opt('web-skip', $h) || '';
if (exists $builtinweb{$url}) {
$skip = $builtinweb{$url}->{'skip'} unless $skip;
@@ -1885,15 +1891,15 @@
$arg = $url;
if ($url) {
- $reply = geturl(opt('proxy'), $url) || '';
+ $reply = geturl(opt('proxy', $h), $url) || '';
}
} elsif (($use eq 'cisco')) {
# Stuff added to support Cisco router ip http daemon
# User fw-login should only have level 1 access to prevent
# password theft. This is pretty harmless.
- my $queryif = opt('if');
- $skip = opt('fw-skip') || '';
+ my $queryif = opt('if', $h);
+ $skip = opt('fw-skip', $h) || '';
# Convert slashes to protected value "\/"
$queryif =~ s%\/%\\\/%g;
@@ -1901,13 +1907,30 @@
# Protect special HTML characters (like '?')
$queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge;
- $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR";
- $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || '';
+ $url = "http://".opt('fw', $h)."/level/1/exec/show/ip/interface/brief/${queryif}/CR";
+ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || '';
+ $arg = $url;
+
+ } elsif (($use eq 'cisco-asa')) {
+ # Stuff added to support Cisco ASA ip https daemon
+ # User fw-login should only have level 1 access to prevent
+ # password theft. This is pretty harmless.
+ my $queryif = opt('if', $h);
+ $skip = opt('fw-skip', $h) || '';
+
+ # Convert slashes to protected value "\/"
+ $queryif =~ s%\/%\\\/%g;
+
+ # Protect special HTML characters (like '?')
+ $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge;
+
+ $url = "https://".opt('fw', $h)."/exec/show%20interface%20${queryif}";
+ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || '';
$arg = $url;
} else {
- $url = opt('fw') || '';
- $skip = opt('fw-skip') || '';
+ $url = opt('fw', $h) || '';
+ $skip = opt('fw-skip', $h) || '';
if (exists $builtinfw{$use}) {
$skip = $builtinfw{$use}->{'skip'} unless $skip;
@@ -1916,7 +1939,7 @@
$arg = $url;
if ($url) {
- $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || '';
+ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || '';
}
}
if (!defined $reply) {

View file

@ -1,16 +0,0 @@
#!/bin/bash
# whichlist
# * add getopt
# * automatic version
{
cat <<EOF
#
# patch created with \`svn diff -r$1 . > patches/$2\`
# on $(date)
# applied on r$1
#
EOF
svn diff -r$1 ddclient
} > patches/$2.new

View file

@ -1,183 +0,0 @@
--- ddclient 2007-08-28 15:41:51.000000000 -0700
+++ ddclient.noip 2007-08-28 15:37:32.000000000 -0700
@@ -376,6 +376,25 @@
'mx' => setv(T_OFQDN, 0, 1, 1, '', undef),
'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef),
},
+ 'noip-common-defaults' => {
+ 'static' => setv(T_BOOL, 0, 1, 1, 0, undef),
+ },
+ 'noip-service-common-defaults' => {
+ 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef),
+ 'login' => setv(T_LOGIN, 1, 0, 1, '', undef),
+ 'password' => setv(T_PASSWD, 1, 0, 1, '', undef),
+ 'host' => setv(T_STRING, 1, 1, 1, '', undef),
+ 'ip' => setv(T_IP, 0, 1, 0, undef, undef),
+ 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')),
+ 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef),
+ 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef),
+ 'status' => setv(T_ANY, 0, 1, 0, '', undef),
+ 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0),
+ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0),
+ 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),
+ 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef),
+ 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef),
+ },
);
my %services = (
'dyndns1' => {
@@ -398,6 +417,16 @@
$variables{'service-common-defaults'},
),
},
+ 'noip' => {
+ 'updateable' => undef,
+ 'update' => \&nic_noip_update,
+ 'examples' => \&nic_noip_examples,
+ 'variables' => merge(
+ { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), },
+ $variables{'noip-common-defaults'},
+ $variables{'noip-service-common-defaults'},
+ ),
+ },
'concont' => {
'updateable' => undef,
'update' => \&nic_concont_update,
@@ -2359,6 +2388,137 @@
if $state ne 'results2';
}
}
+
+
+######################################################################
+## nic_noip_update
+## Note: uses same features as nic_dyndns2_update, less return codes
+######################################################################
+sub nic_noip_update {
+ debug("\nnic_noip_update -------------------");
+
+ ## group hosts with identical attributes together
+ my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]);
+
+ my %errors = (
+ 'badauth' => 'Invalid username or password',
+ 'badagent' => 'Invalid user agent',
+ 'nohost' => 'The hostname specified does not exist in the database',
+ '!donator' => 'The offline setting was set, when the user is not a donator',
+ 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com',
+ 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com',
+ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org',
+ 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive',
+ );
+
+ ## update each set of hosts that had similar configurations
+ foreach my $sig (keys %groups) {
+ my @hosts = @{$groups{$sig}};
+ my $hosts = join(',', @hosts);
+ my $h = $hosts[0];
+
+ info("setting IP address to %s for %s", $ip, $hosts);
+ verbose("UPDATE:","updating %s", $hosts);
+
+ my $url = "http://$config{$h}{'server'}/nic/update?system=";
+ $url .= 'noip';
+ $url .= "&hostname=$hosts";
+ $url .= "&myip=";
+ $url .= $ip if $ip;
+
+
+ print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n";
+
+
+ my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'});
+ if (!defined($reply) || !$reply) {
+ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'});
+ last;
+ }
+ last if !header_ok($hosts, $reply);
+
+ my @reply = split /\n/, $reply;
+ my $state = 'header';
+ foreach my $line (@reply) {
+ if ($state eq 'header') {
+ $state = 'body';
+
+ } elsif ($state eq 'body') {
+ $state = 'results' if $line eq '';
+
+ } elsif ($state =~ /^results/) {
+ $state = 'results2';
+
+ my ($status, $ip) = split / /, lc $line;
+ my $h = shift @hosts;
+
+ $config{$h}{'status'} = $status;
+ if ($status eq 'good') {
+ $config{$h}{'ip'} = $ip;
+ $config{$h}{'mtime'} = $now;
+ success("updating %s: %s: IP address set to %s", $h, $status, $ip);
+
+ } elsif (exists $errors{$status}) {
+ if ($status eq 'nochg') {
+ warning("updating %s: %s: %s", $h, $status, $errors{$status});
+ $config{$h}{'ip'} = $ip;
+ $config{$h}{'mtime'} = $now;
+ $config{$h}{'status'} = 'good';
+
+ } else {
+ failed("updating %s: %s: %s", $h, $status, $errors{$status});
+ }
+
+ } elsif ($status =~ /w(\d+)(.)/) {
+ my ($wait, $units) = ($1, lc $2);
+ my ($sec, $scale) = ($wait, 1);
+
+ ($scale, $units) = (1, 'seconds') if $units eq 's';
+ ($scale, $units) = (60, 'minutes') if $units eq 'm';
+ ($scale, $units) = (60*60, 'hours') if $units eq 'h';
+
+ $sec = $wait * $scale;
+ $config{$h}{'wtime'} = $now + $sec;
+ warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip);
+
+ } else {
+ failed("updating %s: %s: unexpected status (%s)", $h, $line);
+ }
+ }
+ }
+ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'})
+ if $state ne 'results2';
+ }
+}
+######################################################################
+## nic_noip_examples
+######################################################################
+sub nic_noip_examples {
+ return <<EoEXAMPLE;
+o 'noip'
+
+The 'No-IP Compatible' protocol is used to make dynamic dns updates
+over an http request. Details of the protocol are outlined at:
+http://www.no-ip.com/integrate/
+
+Configuration variables applicable to the 'noip' protocol are:
+ protocol=noip ##
+ server=fqdn.of.service ## defaults to dynupdate.no-ip.com
+ login=service-login ## login name and password registered with the service
+ password=service-password ##
+ fully.qualified.host ## the host registered with the service.
+
+Example ${program}.conf file entries:
+ ## single host update
+ protocol=noip, \\
+ login=userlogin\@domain.com, \\
+ password=noip-password \\
+ myhost.no-ip.biz
+
+
+EoEXAMPLE
+}
+
######################################################################
## nic_concont_examples
######################################################################

View file

@ -1,33 +0,0 @@
#
# patch added to revision 28
#
Index: ddclient
===================================================================
--- ddclient (revision 27)
+++ ddclient (working copy)
@@ -593,7 +593,7 @@
usage("invalid argument '-use %s'; possible values are:\n%s", $opt{'use'}, join("\n",ip_strategies_usage()))
unless exists $ip_strategies{lc opt('use')};
- $daemon = define($opt{'daemon'}, $globals{'daemon'});
+ $daemon = $opt{'daemon'};
$daemon = 0 if opt('force');
## obtain the IP address to use.
@@ -979,9 +979,13 @@
$opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval')));
$opt{'timeout'} = 0 if opt('timeout') < 0;
- $opt{'daemon'} = minimum('daemon')
- if define($opt{'daemon'},$globals{'daemon'},0)
- && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon');
+
+ ## only set $opt{'daemon'} if it has been explicitly passed in
+ if (define($opt{'daemon'},$globals{'daemon'},0)) {
+ $opt{'daemon'} = interval(opt('daemon'));
+ $opt{'daemon'} = minimum('daemon')
+ if ($opt{'daemon'} < minimum('daemon'));
+ }
## define or modify host options specified on the command-line
if (exists $opt{'options'} && defined $opt{'options'}) {

View file

@ -1,14 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.043910433 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:59.469182565 +0100
@@ -2231,7 +2231,7 @@
'!yours' => 'The hostname specified exists, but not under the username currently being used',
'!donator' => 'The offline setting was set, when the user is not a donator',
'!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.',
- 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked',
+ 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked',
'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org',
'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org',

View file

@ -1,22 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-06-14 22:03:52.000000000 +0200
+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:19.748088891 +0100
@@ -22,6 +22,7 @@
my $now = time;
my $hostname = hostname();
my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/';
+my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/';
my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/';
my $msgs = '';
my $last_msgs = '';
@@ -296,7 +297,7 @@
'global-defaults' => {
'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')),
'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef),
- 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef),
+ 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef),
'pid' => setv(T_FILE, 0, 0, 1, "", undef),
'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef),
'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef),

View file

@ -1,14 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.121898536 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:41.551915957 +0100
@@ -1823,7 +1823,7 @@
# Protect special HTML characters (like '?')
$queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge;
- $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR";
+ $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR";
$reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || '';
$arg = $url;

View file

@ -1,14 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.151893960 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:22:37.171890909 +0100
@@ -21,7 +21,7 @@
$program =~ s/d$//;
my $now = time;
my $hostname = hostname();
-my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/';
+my $etc = ($program =~ /test/i) ? './' : '/etc/';
my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/';
my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/';
my $msgs = '';

View file

@ -1,16 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.023913484 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:03.977494794 +0100
@@ -993,8 +993,8 @@
$opt{'timeout'} = 0 if opt('timeout') < 0;
$opt{'daemon'} = minimum('daemon')
- if define($opt{'daemon'},$globals{'daemon'},0)
- && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon');
+ if interval(define($opt{'daemon'},$globals{'daemon'},0))
+ && interval(define($opt{'daemon'},$globals{'daemon'})) < minimum('daemon');
## define or modify host options specified on the command-line
if (exists $opt{'options'} && defined $opt{'options'}) {

View file

@ -1,14 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:36.919929347 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:15.960666685 +0100
@@ -966,6 +966,8 @@
sub init_config {
%opt = %saved_opt;
+ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'};
+
##
$opt{'quiet'} = 0 if opt('verbose');

View file

@ -1,46 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100
@@ -553,6 +553,12 @@
test_geturl(opt('geturl')) if opt('geturl');
+## process help option
+if (opt('help')) {
+ *STDERR = *STDOUT;
+ usage(0);
+}
+
## read config file because 'daemon' mode may be defined there.
read_config(define($opt{'file'}, default('file')), \%config, \%globals);
init_config();
@@ -1109,16 +1115,14 @@
$config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ];
}
}
- if (opt('help')) {
- *STDERR = *STDOUT;
- usage();
- }
}
######################################################################
## usage
######################################################################
sub usage {
+ my $exitcode = 1;
+ $exitcode = shift if @_ != 0; # use first arg if given
my $msg = '';
if (@_) {
my $format = shift;
@@ -1128,7 +1132,7 @@
}
printf STDERR "%s%s\n", $msg, $opt_usage;
sendmail();
- exit 1;
+ exit $exitcode;
}
######################################################################

View file

@ -1,46 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100
@@ -553,6 +553,12 @@
test_geturl(opt('geturl')) if opt('geturl');
+## process help option
+if (opt('help')) {
+ *STDERR = *STDOUT;
+ usage(0);
+}
+
## read config file because 'daemon' mode may be defined there.
read_config(define($opt{'file'}, default('file')), \%config, \%globals);
init_config();
@@ -1109,16 +1115,14 @@
$config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ];
}
}
- if (opt('help')) {
- *STDERR = *STDOUT;
- usage();
- }
}
######################################################################
## usage
######################################################################
sub usage {
+ my $exitcode = 1;
+ $exitcode = shift if @_ != 0; # use first arg if given
my $msg = '';
if (@_) {
my $format = shift;
@@ -1128,7 +1132,7 @@
}
printf STDERR "%s%s\n", $msg, $opt_usage;
sendmail();
- exit 1;
+ exit $exitcode;
}
######################################################################

View file

@ -1,14 +0,0 @@
Index: ddclient-3.7.0/sample-etc_ppp_ip-up.local
===================================================================
--- ddclient-3.7.0.orig/sample-etc_ppp_ip-up.local 2006-06-14 21:59:40.000000000 +0200
+++ ddclient-3.7.0/sample-etc_ppp_ip-up.local 2006-12-01 23:22:37.101901586 +0100
@@ -34,7 +34,7 @@
;;
*) (
sleep 5
- ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1
+ ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1
) &
;;
esac

View file

@ -1,14 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.062907535 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:53.543086628 +0100
@@ -357,7 +357,7 @@
'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef),
'status' => setv(T_ANY, 0, 1, 0, '', undef),
'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0),
- 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0),
+ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0),
'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),
'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef),

View file

@ -1,24 +0,0 @@
(submitted by Torsten)
cisco_fw.diff
config_path.diff
daemon_check.diff
daemon_interval.diff
maxinterval.diff
sample_path.diff
smc-barricade-7401bra.patch
smc-barricade-fw-alt.diff
update-new-config.patch
cisco_fw.diff: Not sure what this change was about, have to check my
change log.
daemon_check.diff: Changes interpretation of the daemon parameter
to interval (to allow 5m for minutes etc.) when checking for min
value.
daemon_interval.diff: Changes interpretation of daemon interval during
input (now that I look at this, those two could probably be merged).
maxinterval.diff: Increase max interval for updates.
sample_path.diff: Adjust path in stamples.
update-new-config.patch: Force update if config has changed (still
needed?)
smc-*: Support for two more routers.

View file

@ -1,26 +0,0 @@
Index: ddclient-3.6.2/sample-etc_cron.d_ddclient
===================================================================
--- ddclient-3.6.2.orig/sample-etc_cron.d_ddclient 2002-01-04 00:56:34.000000000 +0100
+++ ddclient-3.6.2/sample-etc_cron.d_ddclient 2005-10-18 23:41:12.000000000 +0200
@@ -10,7 +10,7 @@
######################################################################
## force an update twice a month
##
-30 23 1,15 * * root /root/bin/ddclient -daemon=0 -syslog -quiet -force
+30 23 1,15 * * root /usr/sbin/ddclient -daemon=0 -syslog -quiet -force
######################################################################
## retry failed updates every hour (only if you are not using daemon-mode)
##
Index: ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe
===================================================================
--- ddclient-3.6.2.orig/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:40:22.000000000 +0200
+++ ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:41:02.000000000 +0200
@@ -15,6 +15,6 @@
192.168.*) ;;
*)
logger -t dhcpcd IP address changed to $1
- /root/bin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1
+ /usr/sbin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1
;;
esac

View file

@ -1,23 +0,0 @@
Add support for SMC7401BRA:
ddclient support several kind of firewall to retrieve IP address, two of
them are smc-barricade and smc-barricade-alt, but these both doesn't
work with an SMC7401BRA.
Index: ddclient
===================================================================
--- ddclient.orig 2006-12-01 23:22:36.958923399 +0100
+++ ddclient 2006-12-01 23:25:09.796607052 +0100
@@ -73,6 +73,11 @@
'url' => '/status.htm',
'skip' => 'IP Address',
},
+ 'smc-barricade-7401bra' => {
+ 'name' => 'SMC Barricade 7401BRA FW',
+ 'url' => '/admin/wan1.htm',
+ 'skip' => 'IP Address',
+ },
'netgear-rt3xx' => {
'name' => 'Netgear FW',
'url' => '/mtenSysStatus.html',

View file

@ -1,17 +0,0 @@
Index: ddclient-3.7.0/ddclient
===================================================================
--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.003916535 +0100
+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:06.131166238 +0100
@@ -73,6 +73,11 @@
'url' => '/status.htm',
'skip' => 'IP Address',
},
+ 'smc-barricade-alt' => {
+ 'name' => 'SMC Barricade FW (alternate config)',
+ 'url' => '/status.HTM',
+ 'skip' => 'WAN IP',
+ },
'smc-barricade-7401bra' => {
'name' => 'SMC Barricade 7401BRA FW',
'url' => '/admin/wan1.htm',

View file

@ -1,22 +0,0 @@
ddclient did not update the dynamic DNS entry if the config changes.
This patch by Frans Pop to fixes this problem reported as Debian bug
#217041.
Index: ddclient
===================================================================
--- ddclient.orig 2006-12-01 23:22:36.938926449 +0100
+++ ddclient 2006-12-01 23:25:12.987120319 +0100
@@ -1998,6 +1998,13 @@
} elsif (defined($sub) && &$sub($host)) {
$update = 1;
+ } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) ||
+ ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) ||
+ ($cache{$host}{'mx'} ne $config{$host}{'mx'}) ||
+ ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) {
+ info("updating %s because host settings have been changed.", $host);
+ $update = 1;
+
} else {
success("%s: skipped: IP address was already set to %s.", $host, $ip)
if opt('verbose');

View file

@ -1,44 +0,0 @@
#
# patch from
#
--- ddclient 2004-11-24 17:23:56.000000000 +0100
+++ ddclient.orig 2005-01-25 10:03:22.640483000 +0100
@@ -257,6 +257,11 @@
'mx' => setv(T_OFQDN, 0, 1, 1, '', undef),
'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef),
},
+ 'easydns-common-defaults' => {
+ 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef),
+ 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef),
+ 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef),
+ },
'dnspark-common-defaults' => {
'mx' => setv(T_OFQDN, 0, 1, 1, '', undef),
'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef),
@@ -319,6 +324,7 @@
'variables' => merge(
{ 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) },
{ 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),},
+ $variables{'easydns-common-defaults'},
$variables{'service-common-defaults'},
),
},
@@ -2487,14 +2493,14 @@
info("setting IP address to %s for %s", $ip, $hosts);
verbose("UPDATE:","updating %s", $hosts);
- #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&'
+ #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON'
my $url;
- $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit";
- $url .= "&host_id=$hosts";
+ $url = "http://$config{$h}{'server'}/dyn/dyndns.php?";
+ $url .= "hostname=$hosts";
$url .= "&myip=";
$url .= $ip if $ip;
- $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'};
+ $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'};
if ($config{$h}{'mx'}) {
$url .= "&mx=$config{$h}{'mx'}";

View file

@ -1,23 +0,0 @@
#
# patch created with `svn diff -r83 . > patches/eurodns`
# on Tue Feb 19 15:57:27 CET 2008
#
# This patch is based on the original patch from patch #1668836
# It's currently not applied to subversion version of ddclient
#
Index: ddclient
===================================================================
--- ddclient (revision 83)
+++ ddclient (working copy)
@@ -2303,6 +2303,11 @@
## Select the DynDNS system to update
my $url = "http://$config{$h}{'server'}/nic/update?system=";
+ # hack for EuroDynDNS
+ if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) {
+ $url = "http://$config{$h}{'server'}/update/?system=";
+ }
+
if ($config{$h}{'custom'}) {
warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts)
if $config{$h}{'static'};

View file

@ -1,51 +0,0 @@
# [ ddclient-Patches-1893144 ] Foreground patch
# <http://permalink.gmane.org/gmane.network.dns.ddclient.forum/399>
# Adds a foreground options which makes it possible to run ddclient
# as a deamon without forking. patch submitted by John Palkovic.
--- ddclient-3.8.0 2009-01-27 20:14:02.000000000 +0100
+++ ddclient+foreground-3.8.0 2009-08-17 22:27:32.000000000 +0200
@@ -307,6 +307,7 @@
my %variables = (
'global-defaults' => {
'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')),
+ 'foreground' => setv(T_BOOL, 0, 0, 1, 0, undef),
'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef),
'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef),
'pid' => setv(T_FILE, 0, 0, 1, "", undef),
@@ -535,6 +536,7 @@
"usage: ${program} [options]",
"options are:",
[ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ],
++ [ "foreground", "!", "-foreground : do not fork" ],
[ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ],
[ "server", "=s", "-server host : update DNS information on 'host'" ],
[ "protocol", "=s", "-protocol type : update protocol used" ],
@@ -623,7 +625,10 @@
$SIG{'HUP'} = sub { $caught_hup = 1; };
$SIG{'TERM'} = sub { $caught_term = 1; };
$SIG{'KILL'} = sub { $caught_kill = 1; };
-if (opt('daemon') && !opt('force')) {
+# don't fork() if foreground or force is on
+if (opt('foreground') || opt('force')) {
+ ;
+} elsif (opt('daemon')) {
$SIG{'CHLD'} = 'IGNORE';
my $pid = fork;
if ($pid < 0) {
@@ -633,12 +638,15 @@
exit 0;
}
$SIG{'CHLD'} = 'DEFAULT';
- $opt{'syslog'} = 1;
open(STDOUT, ">/dev/null");
open(STDERR, ">/dev/null");
open(STDIN, "</dev/null");
+}
+# write out the pid file if we're daemon'ized
+if(opt('daemon')) {
write_pid();
+ $opt{'syslog'} = 1;
}
umask 077;

View file

@ -1,150 +0,0 @@
# freedns patch
# see https://sourceforge.net/tracker/?func=detail&aid=2832129&group_id=116817&atid=676131
--- ddclient.orig 2009-01-27 14:14:02.000000000 -0500
+++ ddclient 2009-08-05 13:27:25.725870005 -0400
@@ -524,6 +524,16 @@
$variables{'service-common-defaults'},
),
},
+ 'freedns' => {
+ 'updateable' => undef,
+ 'update' => \&nic_freedns_update,
+ 'examples' => \&nic_freedns_examples,
+ 'variables' => merge(
+ { 'server' => setv(T_FQDNP, 1, 0, 1, 'freedns.afraid.org', undef) },
+ { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),},
+ $variables{'service-common-defaults'},
+ ),
+ },
);
$variables{'merged'} = merge($variables{'global-defaults'},
$variables{'service-common-defaults'},
@@ -1157,6 +1167,8 @@
$proto = $config{$h}{'protocol'};
$proto = opt('protocol') if !defined($proto);
+ load_sha1_support() if ($proto eq "freedns");
+
if (!exists($services{$proto})) {
warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto);
delete $config{$h};
@@ -1718,6 +1730,19 @@
{ no warnings; $IO::Socket::SSL::DEBUG = 0; }
}
######################################################################
+## load_sha1_support
+######################################################################
+sub load_sha1_support {
+ my $sha1_loaded = eval {require Digest::SHA1};
+ unless ($sha1_loaded) {
+ fatal(<<"EOM");
+Error loading the Perl module Digest::SHA1 needed for freedns update.
+On Debian, the package libdigest-sha1-perl must be installed.
+EOM
+ }
+ import Digest::SHA1 (qw/sha1_hex/);
+}
+######################################################################
## geturl
######################################################################
sub geturl {
@@ -3378,6 +3403,97 @@
}
}
+######################################################################
+
+######################################################################
+## nic_freedns_examples
+######################################################################
+sub nic_freedns_examples {
+return <<EoEXAMPLE;
+
+o 'freedns'
+
+The 'freedns' protocol is used by DNS services offered by freedns.afraid.org.
+
+Configuration variables applicable to the 'freedns' protocol are:
+ protocol=freedns ##
+ server=fqdn.of.service ## defaults to freedns.afraid.org
+ login=service-login ## login name and password registered with the service
+ password=service-password ##
+ fully.qualified.host ## the host registered with the service.
+
+Example ${program}.conf file entries:
+ ## single host update
+ protocol=freedns, \\
+ login=my-freedns.afraid.org-login, \\
+ password=my-freedns.afraid.org-password \\
+ myhost.afraid.com
+
+EoEXAMPLE
+}
+######################################################################
+## nic_freedns_update
+##
+## written by John Haney
+##
+## based on http://freedns.afraid.org/api/
+## needs this url to update:
+## http://freedns.afraid.org/api/?action=getdyndns&sha=<sha1sum of login|password>
+## This returns a list of host|currentIP|updateURL lines.
+## Pick the line that matches myhost, and fetch the URL.
+## word 'Updated' for success, 'fail' for failure.
+##
+######################################################################
+sub nic_freedns_update {
+
+
+ debug("\nnic_freedns_update -------------------");
+
+ ## First get the list of updatable hosts
+ my $url;
+ $url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=".&sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}");
+ my $reply = geturl(opt('proxy'), $url);
+ if (!defined($reply) || !$reply || !header_ok($_[0], $reply)) {
+ failed("updating %s: Could not connect to %s for site list.", $_[0], $url);
+ return;
+ }
+ my @lines = split("\n", $reply);
+ my %freedns_hosts;
+ grep {
+ my @rec = split(/\|/, $_);
+ $freedns_hosts{$rec[0]} = \@rec if ($#rec > 0);
+ } @lines;
+ if (!keys %freedns_hosts) {
+ failed("Could not get freedns update URLs from %s", $config{$_[0]}{'server'});
+ return;
+ }
+ ## update each configured host
+ foreach my $h (@_) {
+ if(!$h){ next };
+ my $ip = delete $config{$h}{'wantip'};
+ info("setting IP address to %s for %s", $ip, $h);
+ verbose("UPDATE:","updating %s", $h);
+
+ if($ip ne $freedns_hosts{$h}->[1]) {
+ my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]);
+ if (!defined($reply) || !$reply) {
+ failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]);
+ last;
+ }
+ last if !header_ok($h, $reply);
+
+ if($reply =~ /Updated.*host/) {
+ success("updating %s: good: IP address set to %s", $h, $ip);
+ } else {
+ $config{$h}{'status'} = 'failed';
+ warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
+ warning("REPLIED: %s", $reply);
+ failed("updating %s: Invalid reply.", $h);
+ }
+ }
+ }
+}
+
######################################################################
# vim: ai ts=4 sw=4 tw=78 :

View file

@ -1,82 +0,0 @@
# support for LoopiaDNS
# patch submitted by Erik Christiansson: #1609799
#
Index: sample-etc_ddclient.conf
===================================================================
--- sample-etc_ddclient.conf (revision 110)
+++ sample-etc_ddclient.conf (working copy)
@@ -164,3 +164,17 @@
# login=my-namecheap.com-login, \
# password=my-namecheap.com-password \
# myhost.namecheap.com
+
+##
+##
+## Loopia (loopia.se)
+##
+# use=web
+# web=loopia
+# protocol=dyndns2
+# server=dns.loopia.se
+# script=/XDynDNSServer/XDynDNS.php
+# login=my-loopia.se-login
+# password=my-loopia.se-password
+# my.domain.tld,other.domain.tld
+
Index: ddclient
===================================================================
--- ddclient (revision 111)
+++ ddclient (working copy)
@@ -63,6 +63,7 @@
'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' =>
'Current IP Address:', },
'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', },
+ 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current Address:', },
);
my %builtinfw = (
'watchguard-soho' => {
@@ -292,6 +293,7 @@
my %web_strategies = (
'dyndns'=> 1,
'dnspark'=> 1,
+ 'loopia'=> 1,
);
sub setv {
@@ -428,6 +430,7 @@
'examples' => \&nic_dyndns2_examples,
'variables' => merge(
{ 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), },
+ { 'script' => setv(T_STRING, 1, 1, 1, '/nic/update', undef), },
# { 'offline' => setv(T_BOOL, 0, 1, 1, 0, undef), },
$variables{'dyndns-common-defaults'},
$variables{'service-common-defaults'},
@@ -2295,6 +2298,7 @@
Configuration variables applicable to the 'dyndns2' protocol are:
protocol=dyndns2 ##
server=fqdn.of.service ## defaults to members.dyndns.org
+ script=/path/to/script ## defaults to /nic/update
backupmx=no|yes ## indicates that this host is the primary MX for the domain.
static=no|yes ## indicates that this host has a static IP address.
custom=no|yes ## indicates that this host is a 'custom' top-level domain name.
@@ -2365,7 +2369,7 @@
verbose("UPDATE:","updating %s", $hosts);
## Select the DynDNS system to update
- my $url = "http://$config{$h}{'server'}/nic/update?system=";
+ my $url = "http://$config{$h}{'server'}$config{$h}{'script'}?system=";
if ($config{$h}{'custom'}) {
warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts)
if $config{$h}{'static'};
Index: README
===================================================================
--- README (revision 110)
+++ README (working copy)
@@ -27,6 +27,7 @@
DnsPark - See http://www.dnspark.com for details
DslReports - See http://www.dslreports.com for details
Sitelutions - see http://www.sitelutions.com for details
+Loopia - See http://www.loopia.se for details
DDclient now supports many of cable/dsl broadband routers.

View file

@ -1,44 +0,0 @@
#
# patch created with `svn diff -r82 . > patches/mail-on-kill.patch`
# on Fri Feb 8 11:03:01 CET 2008
# applied on r82
#
# This patch prevent ddclient sending out mail when interrupted by
# a TERM signal. It still sends mail ended by a KILL signal.
#
Index: ddclient
===================================================================
--- ddclient (revision 82)
+++ ddclient (working copy)
@@ -602,8 +602,10 @@
}
my $caught_hup = 0;
my $caught_term = 0;
+my $caught_kill = 0;
$SIG{'HUP'} = sub { $caught_hup = 1; };
$SIG{'TERM'} = sub { $caught_term = 1; };
+$SIG{'KILL'} = sub { $caught_kill = 1; };
if (opt('daemon') && !opt('force')) {
$SIG{'CHLD'} = 'IGNORE';
my $pid = fork;
@@ -665,7 +667,7 @@
sendmail();
my $left = $daemon;
- while (($left > 0) && !$caught_hup && !$caught_term) {
+ while (($left > 0) && !$caught_hup && !$caught_term && !$caught_kill) {
my $delay = $left > 10 ? 10 : $left;
$0 = sprintf("%s - sleeping for %s seconds", $program, $left);
@@ -681,9 +683,9 @@
} else {
$result = $result eq 'OK' ? 0 : 1;
}
-} while ($daemon && !$result && !$caught_term);
+} while ($daemon && !$result && !$caught_term && !$caught_kill);
-warning("caught SIGTERM; exiting") if $caught_term;
+warning("caught SIGKILL; exiting") if $caught_kill;
unlink_pid();
sendmail();

View file

@ -1,227 +0,0 @@
#
# Patch to add multiple IP support to ddclient-3.7.3
# Copyright (C) 2008 Astaro AG www.astaro.com
# Author: Ingo Schwarze <ischwarze-OOs/4mkCeqbQT0dZR+AlfA@public.gmane.org> 16.09.2008
#
# This patch is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This patch is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the ddclient program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
# or look up http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt .
#
Index: ddclient
===================================================================
RCS file: /home/cvs/sources/d/ddclient/ddclient,v
retrieving revision 1.1.1.2
retrieving revision 1.4.2.1
diff -u -p -r1.1.1.2 -r1.4.2.1
--- ddclient 15 Sep 2008 11:13:55 -0000 1.1.1.2
+++ ddclient 24 Sep 2008 10:06:24 -0000 1.4.2.1
@@ -10,6 +10,9 @@
#
# website: http://ddclient.sf.net
#
+# Support for multiple IP numbers added by
+# Astaro AG, Ingo Schwarze <ischwarze-OOs/4mkCeqbQT0dZR+AlfA@public.gmane.org> September 16, 2008
+#
######################################################################
require 5.004;
use strict;
@@ -349,6 +352,19 @@ my %variables = (
'login' => setv(T_LOGIN, 1, 0, 1, '', undef),
'password' => setv(T_PASSWD, 1, 0, 1, '', undef),
'host' => setv(T_STRING, 1, 1, 1, '', undef),
+
+ 'use' => setv(T_USE, 0, 0, 1, 'ip', undef),
+ 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef),
+ 'if-skip' => setv(T_STRING,0, 0, 1, '', undef),
+ 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef),
+ 'web-skip' => setv(T_STRING,0, 0, 1, '', undef),
+ 'fw' => setv(T_ANY, 0, 0, 1, '', undef),
+ 'fw-skip' => setv(T_STRING,0, 0, 1, '', undef),
+ 'fw-login' => setv(T_LOGIN, 0, 0, 1, '', undef),
+ 'fw-password' => setv(T_PASSWD,0, 0, 1, '', undef),
+ 'cmd' => setv(T_PROG, 0, 0, 1, '', undef),
+ 'cmd-skip' => setv(T_STRING,0, 0, 1, '', undef),
+
'ip' => setv(T_IP, 0, 1, 0, undef, undef),
'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')),
'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef),
@@ -594,7 +610,7 @@ if (opt('daemon') && !opt('force')) {
}
umask 077;
-my ($daemon, $ip);
+my $daemon;
do {
$now = time;
$result = 'OK';
@@ -617,19 +633,7 @@ do {
$daemon = $opt{'daemon'};
$daemon = 0 if opt('force');
- ## obtain the IP address to use.
- $ip = get_ip(opt('use'));
-
- ## a little sanity check and then update the NICs..
- if (!defined $ip || !$ip) {
- warning("unable to determine IP address") if !$daemon || opt('verbose');
-
- } elsif ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
- warning("malformed IP address (%s)", $ip);
-
- } else {
- update_nics();
- }
+ update_nics();
if ($daemon) {
debug("sleep %s", $daemon);
@@ -683,20 +687,34 @@ sub update_nics {
my %examined = ();
foreach my $s (sort keys %services) {
- my @hosts = ();
+ my (@hosts, %ips) = ();
my $updateable = $services{$s}{'updateable'};
my $update = $services{$s}{'update'};
foreach my $h (sort keys %config) {
next if $config{$h}{'protocol'} ne lc($s);
$examined{$h} = 1;
+ my $use = $config{$h}{'use'} || opt('use');
+ local $opt{$use} = $config{$h}{$use} if $config{$h}{$use};
+ my $ip = get_ip($use);
+ if (!defined $ip || !$ip) {
+ warning("unable to determine IP address")
+ if !$daemon || opt('verbose');
+ next;
+ }
+ if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
+ warning("malformed IP address (%s)", $ip);
+ next;
+ }
+ $config{$h}{'wantip'} = $ip;
next if !nic_updateable($h, $updateable);
push @hosts, $h;
+ $ips{$ip} = $h;
}
if (@hosts) {
$0 = sprintf("%s - updating %s", $program, join(',', @hosts));
&$update(@hosts);
- runpostscript($ip);
+ runpostscript(join ' ', keys %ips);
}
}
foreach my $h (sort keys %config) {
@@ -1885,7 +1903,7 @@ sub group_hosts_by {
my %groups = ();
foreach my $h (@$hosts) {
- my @keys = @$attributes;
+ my @keys = (@$attributes, 'wantip');
map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys;
my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys);
@@ -1964,6 +1982,7 @@ sub nic_updateable {
my $host = shift;
my $sub = shift;
my $update = 0;
+ my $ip = $config{$host}{'wantip'};
if ($config{$host}{'login'} eq '') {
warning("null login name specified for host %s.", $host);
@@ -2122,6 +2141,7 @@ sub nic_dyndns1_update {
debug("\nnic_dyndns1_update -------------------");
## update each configured host
foreach my $h (@_) {
+ my $ip = delete $config{$h}{'wantip'};
info("setting IP address to %s for %s", $ip, $h);
verbose("UPDATE:","updating %s", $h);
@@ -2266,6 +2286,8 @@ sub nic_dyndns2_update {
my @hosts = @{$groups{$sig}};
my $hosts = join(',', @hosts);
my $h = $hosts[0];
+ my $ip = $config{$h}{'wantip'};
+ delete $config{$_}{'wantip'} foreach @hosts;
info("setting IP address to %s for %s", $ip, $hosts);
verbose("UPDATE:","updating %s", $hosts);
@@ -2398,6 +2420,7 @@ sub nic_concont_update {
## update each configured host
foreach my $h (@_) {
+ my $ip = delete $config{$h}{'wantip'};
info("setting IP address to %s for %s", $ip, $h);
verbose("UPDATE:","updating %s", $h);
@@ -2480,6 +2503,7 @@ sub nic_dslreports1_update {
debug("\nnic_dslreports1_update -------------------");
## update each configured host
foreach my $h (@_) {
+ my $ip = delete $config{$h}{'wantip'};
info("setting IP address to %s for %s", $ip, $h);
verbose("UPDATE:","updating %s", $h);
@@ -2555,6 +2579,7 @@ sub nic_hammernode1_update {
## update each configured host
foreach my $h (@_) {
+ my $ip = delete $config{$h}{'wantip'};
info("setting IP address to %s for %s", $ip, $h);
verbose("UPDATE:","updating %s", $h);
@@ -2636,6 +2661,8 @@ sub nic_zoneedit1_update {
my @hosts = @{$groups{$sig}};
my $hosts = join(',', @hosts);
my $h = $hosts[0];
+ my $ip = $config{$h}{'wantip'};
+ delete $config{$_}{'wantip'} foreach @hosts;
info("setting IP address to %s for %s", $ip, $hosts);
verbose("UPDATE:","updating %s", $hosts);
@@ -2778,6 +2805,9 @@ sub nic_easydns_update {
my @hosts = @{$groups{$sig}};
my $hosts = join(',', @hosts);
my $h = $hosts[0];
+ my $ip = $config{$h}{'wantip'};
+ delete $config{$_}{'wantip'} foreach @hosts;
+
info("setting IP address to %s for %s", $ip, $hosts);
verbose("UPDATE:","updating %s", $hosts);
@@ -2935,6 +2965,9 @@ sub nic_dnspark_update {
my @hosts = @{$groups{$sig}};
my $hosts = join(',', @hosts);
my $h = $hosts[0];
+ my $ip = $config{$h}{'wantip'};
+ delete $config{$_}{'wantip'} foreach @hosts;
+
info("setting IP address to %s for %s", $ip, $hosts);
verbose("UPDATE:","updating %s", $hosts);
@@ -3050,6 +3083,7 @@ sub nic_namecheap_update {
## update each configured host
foreach my $h (@_) {
+ my $ip = delete $config{$h}{'wantip'};
info("setting IP address to %s for %s", $ip, $h);
verbose("UPDATE:","updating %s", $h);
@@ -3132,6 +3166,7 @@ sub nic_sitelutions_update {
## update each configured host
foreach my $h (@_) {
+ my $ip = delete $config{$h}{'wantip'};
info("setting IP address to %s for %s", $ip, $h);
verbose("UPDATE:","updating %s", $h);

View file

@ -1,23 +0,0 @@
# https://sourceforge.net/forum/message.php?msg_id=4789961
# By: hankessels
#
# this patch (r99) isn't complete yet.
# Check https://sourceforge.net/forum/message.php?msg_id=5053976
# for more details. Patch has already been posted to the patches
# section as id #2010819
--- ddclient.old 2008-02-21 00:57:17.000000000 +0900
+++ ddclient 2008-02-21 01:36:42.000000000 +0900
@@ -3060,8 +3060,11 @@ sub nic_namecheap_update {
my $url;
$url = "http://$config{$h}{'server'}/update";
- $url .= "?host=$h";
- $url .= "&domain=$config{$h}{'login'}";
+ my $domain = $config{$h}{'login'};
+ my $host = $h;
+ $host =~ s/(.*)\.$domain(.*)/$1$2/;
+ $url .= "?host=$host";
+ $url .= "&domain=$domain";
$url .= "&password=$config{$h}{'password'}";
$url .= "&ip=";
$url .= $ip if $ip;

View file

@ -1,13 +0,0 @@
Index: ddclient
===================================================================
--- ddclient (revision 88)
+++ ddclient (working copy)
@@ -1996,7 +1996,7 @@
my $sub = shift;
my $update = 0;
- if ($config{$host}{'login'} eq '') {
+ if (!($config{$host}{'login'})) {
warning("null login name specified for host %s.", $host);
} elsif ($config{$host}{'password'} eq '') {

View file

@ -1,18 +0,0 @@
#
# patch created with `svn diff -r65 . > patches/opendns`
# on Mon Jul 23 14:20:22 CEST 2007
# applied on r65
#
Index: ddclient
===================================================================
--- ddclient (revision 65)
+++ ddclient (working copy)
@@ -2272,7 +2272,7 @@
verbose("UPDATE:","updating %s", $hosts);
## Select the DynDNS system to update
- my $url = "http://$config{$h}{'server'}/nic/update?system=";
+ my $url = "https://updates.opendns.com/account/ddns.php?system=";
if ($config{$h}{'custom'}) {
warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts)
if $config{$h}{'static'};

View file

@ -1,77 +0,0 @@
#
# Patch to improve password handling in ddclient-3.7.3
# Copyright (C) 2008 Astaro AG www.astaro.com
# Author: Ingo Schwarze <ischwarze@astaro.com> 30.09.2008
#
# Originally posted on the ddclient-user mailing list
# see http://permalink.gmane.org/gmane.network.dns.ddclient.user/18
#
# This patch is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This patch is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the ddclient program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
# or look up http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt .
#
Index: ddclient
===================================================================
RCS file: /home/cvs/sources/d/ddclient/ddclient,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 ddclient
--- ddclient 15 Sep 2008 11:13:55 -0000 1.1.1.2
+++ ddclient 30 Sep 2008 18:55:52 -0000
@@ -888,6 +888,7 @@ sub _read_config {
local $lineno = 0;
my $continuation = '';
+ my %passwords = ();
while (<FD>) {
s/[\r\n]//g;
@@ -903,10 +904,17 @@ sub _read_config {
}
$content .= "$_\n" unless /^#/;
- # lines contain passwords are a special case, we don't want to
- # arbitrarily strip out '#'
- if (/^(\S*password\S*)\s*=\s*(\S+)/i) { $_ = "$1=$2"; }
- if (/^#/ || !(/password/i) || /#.*password/i) { s/#.*//; } # remove comments
+
+ ## parsing passwords is special
+ if (/^([^#]*\s)?([^#]*?password\S*?)\s*=\s*('.*'|[^']\S*)(.*)/) {
+ my ($head, $key, $value, $tail) = ($1 || '', $2, $3, $4);
+ $value = $1 if $value =~ /^'(.*)'$/;
+ $passwords{$key} = $value;
+ $_ = "${head}${key}=dummy${tail}";
+ }
+
+ ## remove comments
+ s/#.*//;
## handle continuation lines
$_ = "$continuation$_";
@@ -931,6 +939,7 @@ sub _read_config {
## verify that keywords are valid...and check the value
foreach my $k (keys %locals) {
+ $locals{$k} = $passwords{$k} if defined $passwords{$k};
if (!exists $variables{'merged'}{$k}) {
warning("unrecognized keyword '%s' (ignored)", $k);
delete $locals{$k};
@@ -969,6 +978,7 @@ sub _read_config {
$config{$h}{'host'} = $h;
}
}
+ %passwords = ();
}
close(FD);

View file

@ -1,37 +0,0 @@
# http://sourceforge.net/tracker/?func=detail&atid=676130&aid=2880462&group_id=116817
# ddclient hangs forever under some circumstances - ID: 2880462
#
Index: ddclient
===================================================================
--- ddclient (revision 113)
+++ ddclient (working copy)
@@ -1847,14 +1847,12 @@
my $result = syswrite $sd, $rq;
if ($result != length($rq)) {
warning("cannot send to $peer:$port ($!).");
-
} else {
- my $timeout = 0;
- local $SIG{'ALRM'} = sub { $timeout = 1; };
-
$0 = sprintf("%s - reading from %s port %s", $program, $peer, $port);
+ eval {
+ local $SIG{'ALRM'} = sub { die "timeout";};
alarm(opt('timeout')) if opt('timeout') > 0;
- while (!$timeout && ($_ = <$sd>)) {
+ while ($_ = <$sd>) {
$0 = sprintf("%s - read from %s port %s", $program, $peer, $port);
verbose("RECEIVE:", "%s", define($_, "<undefined>"));
$reply .= $_ if defined $_;
@@ -1862,8 +1860,10 @@
if (opt('timeout') > 0) {
alarm(0);
}
+ };
close($sd);
- if ($timeout) {
+
+ if ($@ and $@ =~ /timeout/) {
warning("TIMEOUT: %s after %s seconds", $to, opt('timeout'));
$reply = '';
}

View file

@ -1,24 +0,0 @@
#
# patch submitted by Kmos
# See tracker #1752931
#
--- README.orig 2007-07-09 23:50:01.000000000 +0100
+++ README 2007-07-12 20:50:28.000000000 +0100
@@ -18,7 +16,7 @@
Dynamic DNS services currently supported include:
-DynDNS.org - See http://www.dyndns.org for details on obtaining a free account.
+DynDNS.com - See http://www.dyndns.com for details on obtaining a free account.
Hammernode - See http://www.hn.org for details on obtaining a free account.
Zoneedit - See http://www.zoneedit.com for details.
EasyDNS - See http://www.easydns.com for details.
@@ -34,7 +32,7 @@
http://sourceforge.net/projects/ddclient/
The code was originally written by Paul Burry and is now hosted and maintained
-through sf.net. Please check out http://ddclient.sf.net and the project page.
+through sourceforge.net. Please check out http://ddclient.sf.net
-------------------------------------------------------------------------------
REQUIREMENTS:

View file

@ -1,23 +0,0 @@
#
# patch created with `svn diff -r61 . > patches/regex_vlan.patch`
# on Tue Jul 10 21:29:49 CEST 2007
# applied on r61
#
# bug originally reported on ubuntu:
# https://bugs.edge.launchpad.net/ubuntu/+source/ddclient/+bug/77570
# posted upstream as bug #1747337
# patch written by marclogghe
#
Index: ddclient
===================================================================
--- ddclient (revision 61)
+++ ddclient (working copy)
@@ -1601,7 +1601,7 @@
return undef if $value eq "";
} elsif ($type eq T_IF) {
- return undef if $value !~ /^[a-z0-9:_-]+$/;
+ return undef if $value !~ /^[a-z0-9:._-]+$/;
} elsif ($type eq T_PROG) {
return undef if $value eq "";

View file

@ -1,15 +0,0 @@
#
# typo_dnspark.patch send by Marco.
# Applied on ddclient Rev 72
#
--- ddclient.orig 2007-07-31 15:44:20.000000000 +0100
+++ ddclient 2007-07-31 15:45:52.000000000 +0100
@@ -2875,7 +2875,7 @@
The 'dnspark' protocol is used by DNS service offered by www.dnspark.com.
-Configuration variables applicable to the 'easydns' protocol are:
+Configuration variables applicable to the 'dnspark' protocol are:
protocol=dnspark ##
server=fqdn.of.service ## defaults to www.dnspark.com
backupmx=no|yes ## indicates that DNSPark should be the secondary MX

View file

@ -1,18 +0,0 @@
#
# patch created with `svn diff -r57 . > patches/typo_namecheap_patch.diff`
# on Tue Jul 10 09:25:19 CEST 2007
# applied on r57
#
Index: ddclient
===================================================================
--- ddclient (revision 59)
+++ ddclient (working copy)
@@ -3014,7 +3014,7 @@
The 'namecheap' protocol is used by DNS service offered by www.namecheap.com.
-Configuration variables applicable to the 'easydns' protocol are:
+Configuration variables applicable to the 'namecheap' protocol are:
protocol=namecheap ##
server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com
login=service-login ## login name and password registered with the service

View file

@ -1,34 +0,0 @@
--- ddclient-3.7.1/ddclient.orig 2007-05-03 23:24:39.000000000 +0100
+++ ddclient-3.7.1/ddclient 2007-05-03 23:27:44.000000000 +0100
@@ -1635,6 +1642,20 @@
$res;
}
######################################################################
+## load_ssl_support
+######################################################################
+sub load_ssl_support {
+ my $ssl_loaded = eval {require IO::Socket::SSL};
+ unless ($ssl_loaded) {
+ fatal(<<"EOM");
+Error loading the Perl module IO::Socket::SSL needed for SSL connect.
+On Debian, the package libio-socket-ssl-perl must be installed.
+EOM
+ }
+ import IO::Socket::SSL;
+ { no warnings; $IO::Socket::SSL::DEBUG = 0; }
+}
+######################################################################
## geturl
######################################################################
sub geturl {
@@ -1663,9 +1684,7 @@
if ( $globals{'ssl'} and (caller(1))[3] ne 'main::get_ip' ) {
$use_ssl = 1;
$default_port = 443;
- require IO::Socket::SSL;
- import IO::Socket::SSL;
- { no warnings; $IO::Socket::SSL::DEBUG = 0; }
+ load_ssl_support;
} else {
$use_ssl = 0;
$default_port = 80;

View file

@ -1,11 +0,0 @@
--- ddclient-3.7.1/ddclient.orig 2007-04-28 14:31:23.000000000 +0100
+++ ddclient-3.7.1/ddclient 2007-04-28 14:31:33.000000000 +0100
@@ -21,7 +21,7 @@
$program =~ s/d$//;
my $now = time;
my $hostname = hostname();
-my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/';
+my $etc = ($program =~ /test/i) ? './' : '/etc/';
my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/';
my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/';
my $msgs = '';

View file

@ -1,11 +0,0 @@
--- ddclient-3.7.1/ddclient.orig 2007-04-28 20:43:53.000000000 +0100
+++ ddclient-3.7.1/ddclient 2007-04-28 20:42:57.000000000 +0100
@@ -977,6 +977,8 @@
sub init_config {
%opt = %saved_opt;
+ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'};
+
##
$opt{'quiet'} = 0 if opt('verbose');

View file

@ -1,13 +0,0 @@
# patch original from ubuntu forum:
# https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066
--- ddclient 2007-10-25 19:39:46.000000000 +0300
+++ ddclient 2007-10-25 19:36:41.000000000 +0300
@@ -328,7 +328,7 @@
'cmd' => setv(T_PROG, 0, 0, 1, '', undef),
'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef),
- 'timeout' => setv(T_DELAY, 0, 0, 1, 0, interval('120s')),
+ 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), interval('120s')),
'retry' => setv(T_BOOL, 0, 0, 0, 0, undef),
'force' => setv(T_BOOL, 0, 0, 0, 0, undef),
'ssl' => setv(T_BOOL, 0, 0, 0, 0, undef),

View file

@ -1,11 +0,0 @@
--- ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu.orig 2007-04-28 13:01:23.000000000 +0100
+++ ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu 2007-04-28 13:01:51.000000000 +0100
@@ -5,7 +5,7 @@
# Submitted by paolo martinelli
DDCLIENT=/usr/sbin/ddclient
-CONF=/etc/ddclient/ddclient.conf
+CONF=/etc/ddclient.conf
PIDFILE=/var/run/ddclient.pid
test -x $DDCLIENT || exit 0

View file

@ -1,6 +0,0 @@
config_path.diff
dyndns_com.diff
daemon_interval.diff
sample_ubuntu.diff
smc-barricade-fw-alt.diff
checked_ssl_load.diff

View file

@ -1,14 +0,0 @@
--- ddclient-3.7.1/ddclient.orig 2007-04-30 00:43:32.000000000 +0100
+++ ddclient-3.7.1/ddclient 2007-05-03 23:07:24.000000000 +0100
@@ -73,6 +73,11 @@
'url' => '/status.htm',
'skip' => 'IP Address',
},
+ 'smc-barricade-alt' => {
+ 'name' => 'SMC Barricade FW (alternate config)',
+ 'url' => '/status.HTM',
+ 'skip' => 'WAN IP',
+ },
'smc-barricade-7401bra' => {
'name' => 'SMC Barricade 7401BRA FW',
'url' => '/admin/wan1.htm',