Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Nov 2004 14:19:18 +0200
From:      John Hay <jhay@icomtek.csir.co.za>
To:        freebsd-net@freebsd.org
Subject:   multicast socket behaviour on IPv4 and IPv6
Message-ID:  <20041113121918.GA59462@zibbi.icomtek.csir.co.za>

next in thread | raw e-mail | index | archive | help
Hi Guys,

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
-- 
John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041113121918.GA59462>