netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: dean gaudet <dean@arctic.org>, netdev@vger.kernel.org
Subject: Re: why would EPIPE cause socket port to change?
Date: Tue, 23 Jan 2007 14:15:45 +0300	[thread overview]
Message-ID: <45B5EE61.7010507@tls.msk.ru> (raw)
In-Reply-To: <20070123111225.GA29349@gondor.apana.org.au>

Herbert Xu wrote:
> On Tue, Jan 23, 2007 at 02:10:39PM +0300, Michael Tokarev wrote:
>> Well, but why getsockname() didn't just return ENOTCONN?
> 
> It's perfectly valid to have a local port number without being connected.

Er.  You're right - I was confusing getSOCKname() and getPEERname().

Still, after the connection has been closed, there's no chance to do
anything with the filedescriptor but to close it as well, right?  Or
can the fd be reused by making new connection with it, as if it were
just returned from socket() call?

If it's the former, than there's no reason to assign new local address
to it.

/mjt

  reply	other threads:[~2007-01-23 11:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23  4:01 why would EPIPE cause socket port to change? dean gaudet
2007-01-23  5:44 ` Herbert Xu
2007-01-23 11:10   ` Michael Tokarev
2007-01-23 11:12     ` Herbert Xu
2007-01-23 11:15       ` Michael Tokarev [this message]
2007-01-23 11:18         ` Herbert Xu
2007-01-23 18:22   ` Rick Jones
2007-01-23 20:11     ` dean gaudet
2007-01-24  5:11       ` David Miller
2007-01-24  6:09         ` dean gaudet
2007-01-23 20:26   ` Stephen Hemminger
2007-01-24  5:58     ` Herbert Xu
2007-01-24  6:30       ` David Miller

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=45B5EE61.7010507@tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=dean@arctic.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).