Bind problem / bug?

From: Rogier Wolff (R.E.Wolff@bitwizard.nl)
Date: Thu Apr 27 2000 - 17:45:49 EST


Hi,

We have a deamon that needs to connect to a server. The server however
is kind of picky: You are ALSO supposed to use a specific source port
number!

        Linux box server

        IP: 10.11.12.13 <------> IP: 10.11.12.101
        port: 33811 port: 33811

This is all fine. Next thing you know, you want two of those deamons
talking to that one server. Now the shit hits the fan, as those two
connections are going to have all 4 identifying parameters (src IP,
src port, dst IP, dst port) the same.

As the server is "hardware" and already in the field, we can't really
change anything there. So a workaround would be to configure two IP
addresses on the Linux box, and bind to two different IPs on the linux
box:

        Linux box server

        IP: 10.11.12.13
        port: 33811 <---\
                                  \---> IP: 10.11.12.101

                                  /---> port: 33811
        IP: 10.11.12.14 <---/
        port: 33811

This should be possible. It seems to work on 2.2.15, however, the
2.3.99 kernels give an "EINVAL" error on the "bind" (or was it the
"connect") call.

All this is UDP.

                                Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
*       Common sense is the collection of                                *
******  prejudices acquired by age eighteen.   -- Albert Einstein ********

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



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:13 EST