netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kuznet@ms2.inr.ac.ru
To: davem@redhat.com (David S. Miller)
Cc: jmorris@redhat.com, hidden@balabit.hu, netdev@oss.sgi.com,
	linux-net@vger.rutgers.edu
Subject: Re: Fw: Re: [PATCH] ipv4 tcp autobind problem
Date: Tue, 30 Sep 2003 16:37:48 +0400 (MSD)	[thread overview]
Message-ID: <200309301237.QAA01426@yakov.inr.ac.ru> (raw)
In-Reply-To: <20030930024320.5aca8ddc.davem@redhat.com> from "David S. Miller" at óÅÎ 30, 2003 02:43:20

Hello!

> in inet_sendmsg() is that when an RST is received, sk->num is set to zero, 

Yes, I remember this. This funny thing was added to avoid using reserved
ports obtained from accept() to do connect(). Before that sockets were never
unbound after they bound once exactly to avoid weirdness of the kind
descibed in your mail, but this happened to be insecure.

>From this mail I still do not see why autobinding of void socket is so
bad thing, that it requires marginal fixing at the place which is already
marginal. What is the real problem? So, bad sendmsg() selects some port as
a side effect. It makes it on udp and tcp. What is the deal? If it is disaster
for tcp, why it is not bad for udp?


> local port (sk->sport) remains unchanged until the socket is closed.

Socket is _closed_. Local port is reset only after socket is closed,
unless PORT_USERLOCK is set. And sk->sport remains unchanged even
after socket is closed, btw, so... 

I do recognize that current behaviour is weird, but I still want to know
how this marginal weirdness escaped to be seen in reality.

Alexey

       reply	other threads:[~2003-09-30 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030930024320.5aca8ddc.davem@redhat.com>
2003-09-30 12:37 ` kuznet [this message]
2003-09-30 12:37   ` Fw: Re: [PATCH] ipv4 tcp autobind problem David S. Miller
2003-09-30 14:19   ` Kovacs Krisztian
2003-10-07 11:56     ` kuznet
2003-10-07 12:35       ` Kovacs Krisztian

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=200309301237.QAA01426@yakov.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=davem@redhat.com \
    --cc=hidden@balabit.hu \
    --cc=jmorris@redhat.com \
    --cc=linux-net@vger.rutgers.edu \
    --cc=netdev@oss.sgi.com \
    /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;
as well as URLs for NNTP newsgroup(s).