Our application works with raw sockets and needs to discover PMTU of IPv6 paths.
According to the RFC-3542 (http://tools.ietf.org/html/rfc3542, section 11) the socket option IPV6_RECVPATHMTU allows applications to know about the change of path MTU by receipt of new ancillary data item (IPV6_PATHMTU) which is delivered to recvmsg() without any actual data. Following construction should be used to enable this option:
int on = 1;
setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPATHMTU, &on, sizeof(on));
In the online Sun documentation I found that this socket option is supported since Solaris 10 (http://docs.sun.com/app/docs/doc/816-5177/ip6-7p).
However, in our test this socket option appears to be not working. After decrease of the PMTU via ifconfig and sending a big enough packet an ICMP (Packet Too Big) is received but there is no event with ancillary data item on the socket.
One peculiarity that may be essential is that our application binds to a specific port in a raw socket (i.e. to IP address : port pair).
Does anyone have information if the IPV6_RECVPATHMTU socket option is really supported in Solaris 10?
Probably, ICMP should be off to be able to receive this event with ancillary data on the socket?
Will appreciate any ideas how to make it working.