[lkml]   [2004]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRE: raw sockets and blocking

    > 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.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:01    [W:0.022 / U:24.032 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site