Messages in this thread | | | Date | Mon, 19 Oct 1998 08:01:43 +0200 (SAST) | From | Craig Schlenter <> | Subject | Re: more specific TCP bindings |
| |
[snip] > If I bind a TCP socket to INADDR_ANY with SO_REUSEADDR set, then try to > bind to a specific address, it is denied. Trying to do the same thing > works with UDP. > > Aside from the fact that being able to do this is a useful feature, it is > inconsistent between UDP and TCP.
This would be a rather cool feature to have. I know this sort of thing definitely works on gauntlet firewalls as I've used it to do some rather strange things. The gauntlet has a slightly modified BSD/OS network stack though ... I can't say I remember ever getting it to work on anything other than a gauntlet.
Strictly speaking there is a clash between INADDR_ANY and a bind to a specific address as INADDR_ANY already includes that address but practically it's nice to have bind perform much like a routing table where the most specific entry is chosen and you can have an 'overlap'.
If anyone knows how to get this sort of thing going on linux I'd be very interested although I'm almost sure I asked this once before a long time ago and I seem to recall being told it was a non-trivial exercise based on how the linux stack currently worked.
If any bright people would like to take a look at it, net/ipv4/tcp_ipv4.c contains a tcp_v4_verify_bind function ... of course said people would know where to look ;)
Thank you,
--Craig
- 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/
| |