multicast socket behaviour on IPv4 and IPv6
jhay at icomtek.csir.co.za
Sat Nov 13 04:19:24 PST 2004
While debugging a misbehaving program, I found that on FreeBSD, if you
bind() a udp socket to a multicast address, so that you can receive on
it, and you then mistakenly use it to send, the behaviour between IPv4
and IPv6 differ. On IPv6 you get a error EOPNOTSUPP, which is
understandable, but on IPv4 the packet is actually send with the source
address being the multicast address. Is that the expected behaviour?
Looking through the code, I see that in IPv6 there is a lot of sanity
checks in the output routine, but very little to check the source
address in the IPv4 output routine.
John Hay -- John.Hay at icomtek.csir.co.za / jhay at FreeBSD.org
More information about the freebsd-net