]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sws: repair --port, and accept any port
authorDaniel Stenberg <daniel@haxx.se>
Thu, 13 Nov 2025 15:39:10 +0000 (16:39 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 13 Nov 2025 16:20:41 +0000 (17:20 +0100)
Also for mqttd and sockfilt. The < 1025 check was not serving any
purpose.

Follow-up to bb1391f94394e635c1a5c58253e7a3d3b36bde57

tests/server/mqttd.c
tests/server/sockfilt.c
tests/server/sws.c

index c99a0e8084e4915afec6d0753184e217b6373a6b..df5fb3690337c8578b1718ea35e8685eaab8039f 100644 (file)
@@ -801,7 +801,7 @@ static int test_mqttd(int argc, char *argv[])
       arg++;
       if(argc > arg) {
         opt = argv[arg];
-        if(curlx_str_number(&opt, &num, 0xffff) || num < 1025) {
+        if(curlx_str_number(&opt, &num, 0xffff)) {
           fprintf(stderr, "mqttd: invalid --port argument (%s)\n",
                   argv[arg]);
           return 0;
index 91ebb7c9a12515970fd8a3132ba399e1ba6b470d..7320fa6fe9a25be182740bd73553185b31716395 100644 (file)
@@ -1305,7 +1305,7 @@ static int test_sockfilt(int argc, char *argv[])
       arg++;
       if(argc > arg) {
         opt = argv[arg];
-        if(curlx_str_number(&opt, &num, 0xffff) || num < 1025) {
+        if(curlx_str_number(&opt, &num, 0xffff)) {
           fprintf(stderr, "sockfilt: invalid --connect argument (%s)\n",
                   argv[arg]);
           return 0;
index ab73ec336948abacbd0bfb7dd9c8ddebd264ac27..29e69d893ba2b92ce354eae7dc1649fe8e4c3c95 100644 (file)
@@ -2096,7 +2096,7 @@ static int test_sws(int argc, char *argv[])
       arg++;
       if(argc > arg) {
         opt = argv[arg];
-        if(curlx_str_number(&opt, &num, 0xffff) || num < 1025) {
+        if(curlx_str_number(&opt, &num, 0xffff)) {
           fprintf(stderr, "sws: invalid --port argument (%s)\n",
                   argv[arg]);
           return 0;