Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MonetDB 'allows' binding and connecting to ports above 65535 (has patch) #2738

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed
Labels
bug Something isn't working MAL/M5 minor

Comments

@monetdb-team
Copy link

Date: 2010-12-04 00:48:01 +0100
From: @skinkie
To: MonetDB5 devs <>
Version: 11.1.1 (Mar2011) [obsolete]

Last updated: 2011-03-28 17:31:27 +0200

Comment 15269

Date: 2010-12-04 00:48:01 +0100
From: @skinkie

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.210 Safari/534.10
Build Identifier:

As subject. So specifying 66666 will not give you an error, not for connecting to nor starting the server with it. And it actually 'works' so that surprises me even more.

Reproducible: Always

Comment 15533

Date: 2011-03-05 23:20:50 +0100
From: @skinkie

I guess this is the most 'elegant' solution.

diff -r 650c038f60dd monetdb5/modules/mal/mal_mapi.mx
--- a/monetdb5/modules/mal/mal_mapi.mx Sat Mar 05 21:56:34 2011 +0100
+++ b/monetdb5/modules/mal/mal_mapi.mx Sat Mar 05 23:18:57 2011 +0100
@@ -705,7 +705,7 @@
maxusers = *Maxusers;
maxusers = (maxusers ? maxusers : SERVERMAXUSERS);

  •   if (port <= 0 && usockfile == NULL)
    
  •   if ((port <= 0 || port > 65535) && usockfile == NULL)
              throw(IO, "mal_mapi.listen", OPERATION_FAILED ": no port or socket file specified");
    
      if (port > 0) {
    

Comment 15534

Date: 2011-03-05 23:28:00 +0100
From: @grobian

I'd rather add a separate check which throws an ILLARG (illegal argument port number should be between ...)

Comment 15535

Date: 2011-03-05 23:51:51 +0100
From: @skinkie

Created attachment 58
65535 check

I guess this is what you want.

Attached file: 65535.patch (text/plain, 805 bytes)
Description: 65535 check

Comment 15537

Date: 2011-03-06 10:10:46 +0100
From: @skinkie

Changeset cc16bb8cb4d8 made by Stefan de Konink stefan@konink.de in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=cc16bb8cb4d8

Changeset description:

SERVERlisten: force maximum tcp port 65535

port isn't checked carefully, leading to unexpected success of opening
invalid ports, bug #2738.
At the same time, fix a case of throwing an IO instead of an ILLARG for
invalid arguments.

Reviewed-by: Fabian Groffen <fabian@cwi.nl>

Comment 15538

Date: 2011-03-06 10:11:41 +0100
From: @grobian

pushed, thanks

Comment 15622

Date: 2011-03-28 17:31:27 +0200
From: @sjoerdmullender

The Mar2011 version has been released.

@monetdb-team monetdb-team added bug Something isn't working MAL/M5 minor labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MAL/M5 minor
Projects
None yet
Development

No branches or pull requests

2 participants