Re: raw sockets and blocking

From: Hasso Tepper
Date: Wed Feb 18 2004 - 01:44:12 EST


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.

Related problem is that we have no way to detect if vlan interface
goes down. Wouldn't be correct behavior to remove IFF_RUNNING from
all vlan interfaces bound to ethernet interface if this ethernet
interface goes down? There might be similar problems with other
network interfaces.

--
Hasso Tepper
Elion Enterprises Ltd.
WAN administrator
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/