Re: Possible SOCK_DGRAM bug?

Andi Kleen (ak@muc.de)
18 Feb 1999 12:36:06 +0100


In article <Pine.LNX.4.05.9902170653540.2120-100000@billabong.demon.co.uk>,
linux@billabong.demon.co.uk (John Hayward-Warburton) writes:

> My nameserver is set to 192.168.7.1 (which is running when I'm
> connected to my ISP, otherwise not). The resolver routines open a
> SOCK_DGRAM type connection, then make eight attempts to query the
> nameserver. If the nameserver is NOT running (when the connection to
> the outside world is down), the SOCK_DGRAM connection normally
> opens, accepts data, doesn't 'hang' on the select() that follows,
> but should send ECONNREFUSED at the attempt to read from the socket.

> Unfortunately, on the 7th of the 8 attempts, the select() hangs for
> its full duration (20 seconds in this case), times out, and slows
> everyone down.

Adding before the return

/* No rate limit on loopback */
if (dst->dev && (dst->dev->flags&IFF_LOOPBACK))
return 1;

to net/ipv4/icmpc.c : icmpv4_xrlim_allow() will probably fix it.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/