[openbeosnetteam] DNS bug

Hi,
the mean DNS bug was hidden in our code. But I know where it is and now it will 
be killed! :)))
I hope this fixes it:
The bug is due to R5 compatibility mode. Our DNS code uses OBOS values (address 
family, etc.), but Net+ tries to open an R5 socket, so the boolean 
g_beos_r5_compatibility (socket.c) is set to true in socket().
If this variable is set to true connect() (socket.c) calls 
convert_from_beos_r5_sockaddr() to translate the sockaddr to our own format.
The first address gets resolved because Net+ makes the first DNS lookup before 
any other sockets were created. So, the socket code assumes we are using native 
codes. When the lookup finishes Net+ opens an R5 socket which sets 
compatibility mode. The next DNS lookup tries to use an OBOS socket, but 
connect() fails because it thinks the sockaddr is R5-style, not OBOS-style! 
Thus, all subsequent lookups fail.
I had no time to fix this, yet. Can anyone of you do this today?

Bye,
Waldemar

Other related posts: