dlls/ws2_32: Note and patch about strange UDP packets

Detlef Riekenberg wine.dev at web.de
Mon Nov 20 13:12:23 CST 2006

On Mo, 2006-11-20 at 11:22 +0100, Florian Echtler wrote:

Welcome to wine.

> the software was sending UDP packets to IP _254_.255.255.255 
> (note the first octet). After some experimentation, I noticed that while Windows just
> sends this as a broadcast packet, 

Are you sure, that the Function on Windows also get this wrong IP?
If that is the case, then a fix is needed for the customized tracking
software. There are various API-Hook Tools on the Net.

Wine is also a great Software to make Application-Bugs visible.

Did you already create a simple test-App, that used the IP 254.*
and verified, that Windows interpreted that as Broadcast?
A test for the wine testsuite is always prefered to 
verify, what Windows does.

> I therefore build a small patch which checks for these strange adresses
> and replaces them by broadcast adresses.

You modify the beavior for a complete "/4" - Subnet.
Is this really the same thing, what Windows does?
Reimplement a Windows-Bug will require more tests.

It's also Possible, that a different Function in wine malformed the IP.
You need some tests to verify this.

> However, the question now is whether it makes sense to include
> this patch into Wine?

Even, when tests verified, that Windows is not RFC compliant for
this case, the tracking software should be fixed.

Your Patch need some polish:
- SPACE/TAB mixing
- No C++ comments allowed
- fprintf is wrong here. We have macros for this:

>  as I have not subscribed to the list.
Please subscribe, it's easier for you to follow the discussion.

By by ... Detlef

More information about the wine-devel mailing list