IPV6_RECVPKTINFO not working for IPv4-mapped addresses on Linux?
gert at space.net
Sun Jan 19 23:25:44 CET 2014
On Sun, Jan 19, 2014 at 11:00:00PM +0100, Hannes Frederic Sowa wrote:
> > ... the IPV6_RECVPKTINFO code just returns *nothing* on Linux for this
> > case (specifically, CMSG_FIRSTHDR() is just NULL...) - so it looks as
> > if this is a case of "someone should propably implement this..."
> I see the problem and yes, this is unfortunate, I see.
> Let me cook up a patch this week and depending on the size we maybe can
> get this into stable.
> You can also use IP_PKTINFO on IPv6 socket with correct protocol level in
> setsockopt, it will report the the local address via IPv4 SOL in_pktinfo
> ancillary data, then.
So I would activate both IPPROTO_IPV6/IPV6_RECVPKTINFO *and*
SOL_IP/IP_PKTINFO, and depending on the "real" address family I'll see
one or the other?
Since the recvmsg() code has to be version agnostic anyway, that might
actually work... *testing*... mmmh, it returns *something* (improvement!)
but the bits are not there the way the code expects them (it prints
"200:0:c195:30aa::" as address, which has all the right bits, but not
in the right place).
Ah, I can see what is happening... the code is (unsurprisingly) getting
confused about "is this IPv4 or IPv6" and filling the wrong structure...
more hacking on that tomorrow.
have you enabled IPv6 on something today...?
SpaceNet AG Vorstand: Sebastian v. Bomhard
Joseph-Dollinger-Bogen 14 Aufsichtsratsvors.: A. Grundner-Culemann
D-80807 Muenchen HRB: 136055 (AG Muenchen)
Tel: +49 (0)89/32356-444 USt-IdNr.: DE813185279
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 811 bytes
Desc: not available
Url : http://lists.cluenet.de/pipermail/ipv6-ops/attachments/20140119/b91ef348/attachment.bin
More information about the ipv6-ops