Does linux 2.6.* support an IPSec tunnel with different family of inner and outer addresses , like v4 in v6 or v6 in v4.

After trying ip xfrm * from user space, the utility doesn’t seem to accept two different families in a single command.


#ip xfrm policy add dir out src dst tmpl src 2001:db8:0:242::36/128 dst 2001:db8:0:242::37/128 proto esp  mode tunnel

Error: an inet prefix is expected rather than "2001:db8:0:242::36/128".


So, I tried sending a NETLINK SPD add message) from user space with, selector as v4 addresses and tmpl as v6 address.

Policy got added but kernel doesn’t seem to be interpreting the addresses correctly.


src dst

        dir out priority 1024

        tmpl    src dst   /* I gave ipv6 addresses here*/

                proto esp spi 0x00000000 reqid 0 mode tunnel


Can someone help me with this?