Udp multicast src address bug
Udp multicast src address bug
- Subject: Udp multicast src address bug
- From: Mark Koch <email@hidden>
- Date: Wed, 7 Jan 2004 22:12:41 +0100
Dear group,
maybe I have found a bug in the udp stack of the darwin kernel. I found
nothing via google or in the archives so I decided to post.
Description:
If a multicast address ist binded and connected the source address of
sent packages is the multicast group address. I think there shall be
the local interface address instead.
Verification:
I verified the behavior on my computer running:
Mark-Kochs-Computer:~ mkoch$ uname -v
Darwin Kernel Version 7.2.0: Thu Dec 11 16:20:23 PST 2003;
root:xnu/xnu-517.3.7.obj~1/RELEASE_PPC
Mark-Kochs-Computer:~ mkoch$
aka MacOSX 10.3.2 (Panther). With developer tools as recent as
possible, see:
++ (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for powerpc-apple-darwin7.0
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
For the result see: Usage of sample code.
I compared this to a system running Debian Gnu Linux/i386 (woody) where
the expected behavior is present.
You may be willing to verify this yourself, so I attached sample code
in a zip-file called checkudp.
Usage of sample code:
In a terminal "cd" to the dir extracted from the zip file.
Then build with "make". Now type something like: "./checkudp
192.168.1.2".
This shall look like:
Mark-Kochs-Computer:~/Desktop mkoch$ cd checkudp/
Mark-Kochs-Computer:~/Desktop/checkudp mkoch$ make
g++ -g -Wall -c -o main.o main.cc
g++ -g -Wall -c -o udp.o udp.cc
g++ -g -Wall -c -o address.o address.cc
g++ -g -Wall -c -o error.o error.cc
g++ -g -Wall -c -o connection.o connection.cc
g++ -o checkudp main.o udp.o address.o error.o connection.o
Mark-Kochs-Computer:~/Desktop/checkudp mkoch$ ./checkudp 192.168.1.2
The src address is: 239.255.1.1 but shall be: 192.168.1.2.
Mark-Kochs-Computer:~/Desktop/checkudp mkoch$
Any comments appreciated and thanks for your attention,
Mark
[demime 0.98b removed an attachment of type application/zip which had a name of checkudp.zip]
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.