From 2d06c5856dbbed8dbc178e74adf556cda890db34 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Mon, 2 Apr 2012 10:23:47 +0200 Subject: [PATCH] Warn when receiving delay requests on a peer to peer port. Signed-off-by: Richard Cochran --- port.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/port.c b/port.c index acc9a76..fa0ad45 100644 --- a/port.c +++ b/port.c @@ -684,6 +684,11 @@ static int process_delay_req(struct port *p, struct ptp_message *m) if (p->state != PS_MASTER && p->state != PS_GRAND_MASTER) return -1; + if (p->delayMechanism == DM_P2P) { + pr_warning("port %hu: delay request on P2P port", portnum(p)); + return -1; + } + msg = msg_allocate(); if (!msg) return -1;