diff --git a/dyndns.pl b/dyndns.pl
index 8a86293..5c02b01 100755
--- a/dyndns.pl
+++ b/dyndns.pl
@@ -221,11 +221,14 @@ sub handle_update($$$$$$) {
   } else {
     # Get ipv4, and ipv6 parameters
     my $remote_addr = $cgi->remote_addr;
-    my $ipv4addr = $cgi->param('ipv4addr')
-	|| $cgi->param('ip')
-	|| (is_ipv4($remote_addr) ? $remote_addr : undef);
-    my $ipv6addr = $cgi->param('ipv6addr')
-	|| (! $ipv4addr and is_ipv6($remote_addr)) ? $remote_addr : undef;
+    my $ipv4addr = $cgi->param('ipv4addr') || $cgi->param('ip');
+    if ($ipv4addr == 'auto') {
+        $ipv4addr = is_ipv4($remote_addr) ? $remote_addr : undef;
+    }
+    my $ipv6addr = $cgi->param('ipv6addr') || $cgi->param('ipv6');
+    if ($ipv6addr == 'auto') {
+        $ipv6addr = is_ipv6($remote_addr) ? $remote_addr : undef;
+    }
     ($statuscode, $statusmessage) =
 	DNS_Update($dnsdomain, $dnshost, $ipv4addr, $ipv6addr, $signer, $key, $debug);
   }