diff -Nru ddclient-3.8.0/debian/changelog ddclient-3.8.0/debian/changelog --- ddclient-3.8.0/debian/changelog 2010-03-27 19:40:33.000000000 +0200 +++ ddclient-3.8.0/debian/changelog 2012-02-07 16:44:29.000000000 +0200 @@ -1,3 +1,10 @@ +ddclient (3.8.0-9ubuntu2.1) lucid-proposed; urgency=low + + * checkip-hang.diff: Cherry-pick upstream patch to prevent hang if IP + address check blocks. LP: #928277 + + -- Stefano Rivera Tue, 07 Feb 2012 16:43:40 +0200 + ddclient (3.8.0-9ubuntu2) lucid; urgency=low * Fixed PPP and daemon mode incompatibility (LP: #152875); diff -Nru ddclient-3.8.0/debian/patches/checkip-hang.diff ddclient-3.8.0/debian/patches/checkip-hang.diff --- ddclient-3.8.0/debian/patches/checkip-hang.diff 1970-01-01 02:00:00.000000000 +0200 +++ ddclient-3.8.0/debian/patches/checkip-hang.diff 2012-02-07 16:45:26.000000000 +0200 @@ -0,0 +1,76 @@ +Description: Prevent hang if the IP address check blocks + ddclient may hang if the read operation on the connection to get the ip (in + sub geturl) 'blocks'. +Author: Panos +Origin: http://sourceforge.net/tracker/?func=detail&atid=676130&aid=2880462&group_id=116817 +Bug-Debian: http://bugs.debian.org/600054 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/928277 +Applied-Upstream: http://sourceforge.net/apps/trac/ddclient/changeset/114/trunk +Last-Update: 2012-02-07 + +--- a/ddclient ++++ b/ddclient +@@ -1808,36 +1808,36 @@ + } + + if (defined $sd) { +- ## send the request to the http server +- verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); +- verbose("SENDING:", $request); ++ ## send the request to the http server ++ verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); ++ verbose("SENDING:", $request); + + $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); +- 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; }; ++ my $result = syswrite $sd, $rq; ++ if ($result != length($rq)) { ++ warning("cannot send to $peer:$port ($!)."); ++ } else { ++ $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 ($_ = <$sd>) { ++ $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); ++ verbose("RECEIVE:", "%s", define($_, "")); ++ $reply .= $_ if defined $_; ++ } ++ if (opt('timeout') > 0) { ++ alarm(0); ++ } ++ }; ++ close($sd); + +- $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); +- alarm(opt('timeout')) if opt('timeout') > 0; +- while (!$timeout && ($_ = <$sd>)) { +- $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); +- verbose("RECEIVE:", "%s", define($_, "")); +- $reply .= $_ if defined $_; +- } +- if (opt('timeout') > 0) { +- alarm(0); +- } +- close($sd); +- if ($timeout) { +- warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); +- $reply = ''; +- } +- $reply = '' if !defined $reply; +- } ++ if ($@ and $@ =~ /timeout/) { ++ warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); ++ $reply = ''; ++ } ++ $reply = '' if !defined $reply; ++ } + } + $0 = sprintf("%s - closed %s port %s", $program, $peer, $port); + diff -Nru ddclient-3.8.0/debian/patches/series ddclient-3.8.0/debian/patches/series --- ddclient-3.8.0/debian/patches/series 2010-02-05 13:18:28.000000000 +0200 +++ ddclient-3.8.0/debian/patches/series 2012-02-07 16:42:55.000000000 +0200 @@ -6,3 +6,4 @@ upstream_change_110.diff prevent_cache_leak.diff sample_ubuntu.diff +checkip-hang.diff