Hi,

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.

Cool :-)

> 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.

Thanks!

Gert Doering
        -- NetMaster
-- 
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

Attachment: pgpTf2B5xSRih.pgp
Description: PGP signature

Reply via email to