Skip to content
  • Richard Cochran's avatar
    ptp: fix L2 event message recognition · f75159e9
    Richard Cochran authored
    
    
    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: default avatarRichard Cochran <richard.cochran@omicron.at>
    Cc: <stable@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f75159e9