]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ptp: fix L2 event message recognition
authorRichard Cochran <richardcochran@gmail.com>
Tue, 20 Sep 2011 01:25:41 +0000 (01:25 +0000)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:16:10 +0000 (11:16 -0800)
commit6531810b0bbf78fa23e470e60d930925d38e1ba2
tree4c6a9fa597a2538e10dbad59cd85f0c46021191a
parent0bc3d40cf9c6dd4efee37eef83337bd8bc68de82
ptp: fix L2 event message recognition

commit f75159e9936143177b442afc78150b7a7ad8aa07 upstream.

The IEEE 1588 standard defines two kinds of messages, event and general
messages. Event messages require time stamping, and general do not. When
using UDP transport, two separate ports are used for the two message
types.

The BPF designed to recognize event messages incorrectly classifies L2
general messages as event messages. This commit fixes the issue by
extending the filter to check the message type field for L2 PTP packets.
Event messages are be distinguished from general messages by testing
the "general" bit.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/ptp_classify.h