Re: [Linuxptp-users] PTP4L daemon seems to have a problem with to a link local address for IPv6
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Mario M. <Mar...@we...> - 2012-11-25 05:38:08
|
>> For IPV6 tests I have changed PTP_PRIMARY_MCAST_IP6ADDR to a link local >> address. >> (#define PTP_PRIMARY_MCAST_IP6ADDR "FF02:0:0:0:0:0:0:181") > > Why do you think this should be a link local address? used the local scope in order to use only modules in a closed network segments. > (I chose the global scope in order to maximise the chance of reaching > a master when running slave, and vice versa. I confess that I don't > really know what scope is correct to use here. This is correct and makes sense. But in some cases maybe would like the user change this, but this is not the point at the moment. >> After this change I have saw that the communication and explicit the >> udp6_send didn't work. >> >> I have review the the code of udp6_send and I have saw that the >> sin6_sopce_id of struct sockaddr_in6 addr is not correct initialize. > > Are you running E2E mode? Yes I have used E2E. But problem should also appear with P2P. >It looks like we will have to set sin6_scope_id for the Pdelay >messages in P2P mode in any case. I will do some testing on this to >find out. Ok. Thanks >> + ip6_scope_id = if_nametoindex(name); > > This won't work if you have more than one port. The particular index > must be remembered in a private field derived from the struct > transport. Ok. Thanks for the hint. Yes it's better to use the struct transport. >> + memset(&addr, 0, sizeof(struct sockaddr_in6)); /* Init */ > > This makes sense in any case. Better to use variable name, and the > comment isn't helpful. > > memset(&addr, 0, sizeof(addr)); This is correct the comment is not necessary and it isn't help full and thanks for the hint. >> + > ^ > That is a stray tab. Ok. Thanks, Mario |