Commit 5217805a authored by Davide Ciminaghi's avatar Davide Ciminaghi Committed by Alessandro Rubini

compliance, 9.5.1: discard messages not coming from our domain

parent 2996dd7b
......@@ -36,6 +36,15 @@ int msg_unpack_header(struct pp_instance *ppi, void *buf, int plen)
hdr->controlField = (*(UInteger8 *) (buf + 32));
hdr->logMessageInterval = (*(Integer8 *) (buf + 33));
/*
* 9.5.1:
* Only PTP messages where the domainNumber field of the PTP message
* header (see 13.3.2.5) is identical to the defaultDS.domainNumber
* shall be accepted for processing by the protocol.
*/
if (hdr->domainNumber != GDSDEF(GLBS(ppi))->domainNumber)
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