]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Update setdns.pl to correctly update regfish.de (serverside changes).
authorMarcus Scholz <commander1024@ipfire.org>
Thu, 15 Oct 2009 11:44:07 +0000 (13:44 +0200)
committerMarcus Scholz <commander1024@ipfire.org>
Thu, 15 Oct 2009 11:44:07 +0000 (13:44 +0200)
src/scripts/setddns.pl

index 73d91904571e5da32fd19252bba1cdc14c2f5888..beb9af8b884ee7d530cb7a6cdf28992384ee9f5c 100644 (file)
@@ -391,33 +391,31 @@ if ($ip ne $ipcache) {
                            }
                        }
                        elsif ($settings{'SERVICE'} eq 'regfish') {
-                           # use proxy ?
-                           my %proxysettings;
-                           &General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
-                           if ($_=$proxysettings{'UPSTREAM_PROXY'}) {
-                               my ($peer, $peerport) = (/^(?:[a-zA-Z ]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
-                               Net::SSLeay::set_proxy($peer,$peerport,$proxysettings{'UPSTREAM_USER'},$proxysettings{'UPSTREAM_PASSWORD'} );
-                           }
-
-
-                           my ($out, $response) = Net::SSLeay::get_https(  'www.regfish.com',
-                                                                           443,
-                                                                           "/dyndns/2/?fqdn=$settings{'DOMAIN'}&ipv4=$ip&forcehost=1&authtype=secure&token=$settings{'LOGIN'}",
-                                                                           Net::SSLeay::make_headers('User-Agent' => 'IPFire' )
-                                                                        );
-                           #Valid responses from service are:
-                           #success|100|update succeeded!
-                           #success|101|no update needed at this time..
-                           if ($response =~ m%HTTP/1\.. 200 OK%) {
-                               if ( $out !~ m/(success\|(100|101)\|)/ig ) {
-                                   &General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : failure ($out)");
+                               # use proxy ?
+                               my %proxysettings;
+                               &General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
+                               if ($_=$proxysettings{'UPSTREAM_PROXY'}) {
+                                       my ($peer, $peerport) = (/^(?:[a-zA-Z ]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
+                                       Net::SSLeay::set_proxy($peer,$peerport,$proxysettings{'UPSTREAM_USER'},$proxysettings{'UPSTREAM_PASSWORD'} );
+                               }
+                               my ($out, $response) = Net::SSLeay::get_https(  'dyndns.regfish.de',
+                                                                               443,
+                                                                               "/?fqdn=$settings{'DOMAIN'}&ipv4=$ip&forcehost=1&authtype=secure&token=$settings{'LOGIN'}",
+                                                                               Net::SSLeay::make_headers('User-Agent' => 'Ipfire' )
+                                                                               );
+                               #Valid responses from service are:
+                               # success|100|update succeeded!
+                               # success|101|no update needed at this time..
+                               if ($response =~ m%HTTP/1\.. 200 OK%) {
+                                       if ( $out !~ m/(success\|(100|101)\|)/ig ) {
+                                               &General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : failure ($out)");
+                                       } else {
+                                               &General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : success");
+                                               $success++;
+                                       }
                                } else {
-                                   &General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : success");
-                                   $success++;
+                                       &General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : failure (could not connect to server)");
                                }
-                           } else {
-                               &General::log("Dynamic DNS ip-update for $settings{'DOMAIN'} : failure (could not connect to server)");
-                           }
                        }
                        elsif ($settings{'SERVICE'} eq 'ovh') {
                                my %proxysettings;