On Tue, 4 Aug 2015 10:34:17 +0200, Miroslav Lichvar wrote: > When I run "ptp4l -6 -S -i ens5 -m", ss reports only IPv6 sockets for > ptp4l: > > # ss -lup | grep ptp4l > UNCONN 0 0 ::%ens5:ptp-event :::* > users:(("ptp4l",pid=5862,fd=10)) > UNCONN 0 0 ::%ens5:ptp-general :::* > users:(("ptp4l",pid=5862,fd=11))
Sadly, ss does not report whether a given socket has IPV6_V6ONLY set or not. By default (unless /proc/sys/net/ipv6/bindv6only is set), the IPv6 socket listens for both IPv6 and IPv4 connections, returning the latter as v4-mapped IPv6 address. linuxptp does not seem to set IPV6_V6ONLY, thus creating an UDP6 socket indeed prevents creating an UDP4 one on the same UDP port. Whether or not ptp4l should set IPV6_V6ONLY unconditionally needs some more thinking, but my first impression is it would need to use IPv4 multicast addresses (v4-mapped to IPv6) to send the packets to the v4 hosts and not the IPv6 multicast addresses. This doesn't seem worth the complications and IPV6_V6ONLY looks like to be appropriate here. But somebody should think it through first :-) Jiri -- Jiri Benc ------------------------------------------------------------------------------ _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel