IPV6_RECVPKTINFO not working for IPv4-mapped addresses on Linux?

Simon Perreault simon.perreault at viagenie.ca
Mon Jan 20 15:28:21 CET 2014


Le 2014-01-20 09:00, Gert Doering a écrit :
>> I've run into this sort of problems a few years ago, but I used a
>> different solution: I didn't use mapped addresses but two separate
>> sockets, one for IPv4 and another for IPv6.
>
> This *is* a long-term goal, though, to enable OpenVPN to listen on multiple
> sockets in parallel (including "udp and tcp" in the same server), but this
> part of the code is *old*, has way too many options, and runs on way too
> many systems with their own specific surprises.

<rant>
In my experience, this is the single most difficult thing about 
migrating a code base to dual-stack. Code bases that already deal with 
multiple IPv4-only sockets are *much* easier to migrate to dual-stack 
than those that expect only a single socket. An example of this is 
Asterisk, which used only a single socket (I'm talking about SIP here). 
We considered the alternatives, and eventually decided not to change the 
whole architecture and instead use IPv4-mapped addresses on a single 
socket to support dual-stack. And it sucked, of course. But at least it 
was feasible (with a few tens of thousands line diff). Eventually the 
whole SIP stuff was ripped out of Asterisk and replaced with a 
third-party SIP stack that correctly dealt with multiple sockets and 
thus didn't need IPv4-mappeed addresses to support IPv6.
</rant>

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca


More information about the ipv6-ops mailing list