public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Glines <mark@glines.org>
To: David Miller <davem@davemloft.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch] ip_local_port_range sysctl has annoying default
Date: Fri, 11 May 2007 18:03:58 -0700	[thread overview]
Message-ID: <20070511180358.0ead2227@chirp> (raw)
In-Reply-To: <fa.IaUwa4kCMzO0RD0lNwacYsRlgXk@ifi.uio.no>

On Sat, 12 May 2007 00:06:45 UTC
David Miller <davem@davemloft.net> wrote:
> All ports above and including 1024 are non-privileged and available to
> anyone.
> 
> Applications which have some requirements in this area need to work
> those things out themselves.

Hi David,

I agree completely.  My issue is that an application which doesn't care
which port it binds to (twistd, on klive's behalf) stomped on the port
of an application which cares very much about which port it binds to
(nfs).  I will gladly accept *any* solution to this problem.

I agree that it would be preferable to change the port NFS decides to
bind to.  If you have a patch to do this, I will happily apply it and
go on my merry way.

However, the world we live in does have port numbers exceeding 1024
listed in /etc/services.  What I'd like to know is, for applications
which don't care what port they get, the kernel will assign values of
32768 and above on some machines, but not others. (Based on their bind
hash size.)  Starting from 32768 seems like very sane behavior to me,
because it minimizes the chances of a collision, and (as far as I know)
doesn't cost anything.  A configuration which stomps on a
not-entirely-unknown application like nfs *by default* isn't
necessarily a bug, but it is a worst case scenario, from the
perspective of a lowly user like me, who wants things to Just Work. :)

Is there a compelling reason not to assign random ports starting from
32768 everywhere regardless of their bind hash size, like my patch
attempts to do?  Does it consume any extra resources to do so?

Thanks,

Mark

       reply	other threads:[~2007-05-12  1:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.6ICeqRTz5I23Pq+Z0ov/n8wicZE@ifi.uio.no>
     [not found] ` <fa.IaUwa4kCMzO0RD0lNwacYsRlgXk@ifi.uio.no>
2007-05-12  1:03   ` Mark Glines [this message]
2007-05-12  0:01 [patch] ip_local_port_range sysctl has annoying default Mark Glines
2007-05-12  0:06 ` David Miller
2007-05-12  2:14   ` H. Peter Anvin
2007-05-12  3:18     ` Bernd Eckenfels
2007-05-14 20:19     ` Jan Engelhardt
2007-05-12  2:12 ` H. Peter Anvin
2007-05-12 19:10   ` Mark Glines
2007-05-12 19:12     ` H. Peter Anvin
2007-05-12 19:30       ` Mark Glines
2007-05-12 20:08         ` Alan Cox
2007-05-12 19:19     ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070511180358.0ead2227@chirp \
    --to=mark@glines.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox