From: "David Schwartz" <davids@webmaster.com>
To: <hasso@estpak.ee>
Cc: "Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: RE: raw sockets and blocking
Date: Wed, 18 Feb 2004 03:42:07 -0800 [thread overview]
Message-ID: <MDEHLPKNGKAHNMBLJOLKMENGKHAA.davids@webmaster.com> (raw)
In-Reply-To: <200402180842.19288.hasso@estpak.ee>
> David Schwartz wrote:
> > > we havnt yet tested if it becomes writeable again if we put cable
> > > back in, however if we detect absence of IFF_RUNNING and hence
> > > manually avoid constructing packets to be sent via link-down
> > > interfaces, we avoid this problem. However, this leaves us with a
> > > race.
> > I'm not sure I understand what the problem is. If the network
> > cable is disconnected, you couldn't usefully send anything if the
> > socket was ready anyway.
> One raw socket is used to send packets to several interfaces. If only
> one of them is down, socket will be blocked as well.
Then the kernel is broken. It must not block an operation indefinitely when
that operation can complete without blocking.
It is, however, perfectly legal to say an operation can complete without
blocking (say, through 'select' or 'poll') and later return EWOULDBLOCK. (So
long as some operation could have completed, not necessarily the one you
tried.) Just as a 'poll may return that write is okay for a TCP connection
but a 64Kb write will definitely block.
DS
next prev parent reply other threads:[~2004-02-18 11:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-18 1:33 Paul Jakma
2004-02-18 5:37 ` David Schwartz
2004-02-18 6:42 ` Hasso Tepper
2004-02-18 11:42 ` David Schwartz [this message]
2004-02-19 6:28 ` Paul Jakma
2004-02-19 7:53 ` Jamie Lokier
2004-02-19 8:34 ` Paul Jakma
2004-02-19 12:40 ` Hasso Tepper
2004-02-19 12:54 ` Paul Jakma
2004-03-22 7:14 ` Hasso Tepper
2004-02-18 8:43 ` Hasso Tepper
2004-02-19 6:20 ` Paul Jakma
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=MDEHLPKNGKAHNMBLJOLKMENGKHAA.davids@webmaster.com \
--to=davids@webmaster.com \
--cc=hasso@estpak.ee \
--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
Powered by JetHome