rec: allow to bind on udp port 1024
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Tue, 27 Mar 2018 20:41:18 +0000 (22:41 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Tue, 27 Mar 2018 20:45:27 +0000 (22:45 +0200)
pdns/pdns_recursor.cc
pdns/recursordist/docs/settings.rst

index 302d2863bf91ed4c895541165765f2045271ffc2..4957393c939ded90c94258785d386a9d2e3d0723 100644 (file)
@@ -3237,13 +3237,13 @@ static int serviceMain(int argc, char*argv[])
   }
 
   int port = ::arg().asNum("udp-source-port-min");
-  if(port < 1025 || port > 65535){
+  if(port < 1024 || port > 65535){
     L<<Logger::Error<<"Unable to launch, udp-source-port-min is not a valid port number"<<endl;
     exit(99); // this isn't going to fix itself either
   }
   s_minUdpSourcePort = port;
   port = ::arg().asNum("udp-source-port-max");
-  if(port < 1025 || port > 65535 || port < s_minUdpSourcePort){
+  if(port < 1024 || port > 65535 || port < s_minUdpSourcePort){
     L<<Logger::Error<<"Unable to launch, udp-source-port-max is not a valid port number or is smaller than udp-source-port-min"<<endl;
     exit(99); // this isn't going to fix itself either
   }
@@ -3253,7 +3253,7 @@ static int serviceMain(int argc, char*argv[])
   for (const auto &part : parts)
   {
     port = std::stoi(part);
-    if(port < 1025 || port > 65535){
+    if(port < 1024 || port > 65535){
       L<<Logger::Error<<"Unable to launch, udp-source-port-avoid contains an invalid port number: "<<part<<endl;
       exit(99); // this isn't going to fix itself either
     }
@@ -3577,7 +3577,7 @@ int main(int argc, char **argv)
     ::arg().set("xpf-allow-from","XPF information is only processed from these subnets")="";
     ::arg().set("xpf-rr-code","XPF option code to use")="0";
 
-    ::arg().set("udp-source-port-min", "Minimum UDP port to bind on")="1025";
+    ::arg().set("udp-source-port-min", "Minimum UDP port to bind on")="1024";
     ::arg().set("udp-source-port-max", "Maximum UDP port to bind on")="65535";
     ::arg().set("udp-source-port-avoid", "List of comma separated UDP port number to avoid")="11211";
 
index cb5348ccd09b1d7dcb1a7684ce36cac2516a0324..dbcb127a563cae852976c9ea87bee09be4554cce 100644 (file)
@@ -1074,7 +1074,7 @@ May destroy performance under load.
 .. versionadded:: 4.2.0
 
 -  Integer
--  Default: 1025
+-  Default: 1024
 
 This option sets the low limit of UDP port number to bind on.