Drop non-management messages on the UDS port early in the processing to
prevent them from changing the port or clock state.

Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
---
 port.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/port.c b/port.c
index 6136153..ed33131 100644
--- a/port.c
+++ b/port.c
@@ -691,6 +691,9 @@ static int port_ignore(struct port *p, struct ptp_message 
*m)
 {
        struct ClockIdentity c1, c2;
 
+       if (transport_type(p->trp) == TRANS_UDS && msg_type(m) != MANAGEMENT) {
+               return 1;
+       }
        if (incapable_ignore(p, m)) {
                return 1;
        }
-- 
2.26.2



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to