Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosnetteam] || [Date Prev] [04-2004 Date Index] [Date Next] || [Thread Prev] [04-2004 Thread Index] [Thread Next]

[openbeosnetteam] Re: DNS bug

  • From: "Philippe Houdoin" <philippe.houdoin@xxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Mon, 12 Apr 2004 15:47:39 GMT
> the mean DNS bug was hidden in our code. 

The opposite will have suprise me!
:-)

> But I know where it is and now it will be killed! :)))

Great bug hunting job!

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

Damn. Stupid me.
I was wrong thinking the first socket opened() can inform about R5 
compatibility for all the others coming after.
Sorry about that.

- Philippe

--
Fortune Cookie Says:

"The rights you have are the rights given you by this Committee [the
House Un-American Activities Committee].  We will determine what rights
you have and what rights you have not got."
                -- J. Parnell Thomas





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.