Commit c6834256 authored by Davide Ciminaghi's avatar Davide Ciminaghi Committed by Alessandro Rubini

compliance, 17.4.2, NOTE: discard messages with alternateMasterFlag set

We don't support alternate masters at present.
parent 3707e812
......@@ -64,6 +64,7 @@ enum pp_timeouts {
__PP_TO_ARRAY_SIZE,
};
#define PP_ALTERNATE_MASTER_FLAG 1
#define PP_TWO_STEP_FLAG 2
#define PP_VERSION_PTP 2
......
......@@ -45,6 +45,15 @@ int msg_unpack_header(struct pp_instance *ppi, void *buf, int plen)
if (hdr->domainNumber != GDSDEF(GLBS(ppi))->domainNumber)
return -1;
/*
* Alternate masters (17.4) not supported
* 17.4.2, NOTE:
* A slave node that does not want to use information from alternate
* masters merely ignores all messages with alternateMasterFlag TRUE.
*/
if (hdr->flagField[0] & PP_ALTERNATE_MASTER_FLAG)
return -1;
/*
* If the message is from us, we should discard it.
* The best way to do that is comparing the mac address,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment