Warn when receiving delay requests on a peer to peer port.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-04-02 10:23:47 +02:00
parent 59f00b5061
commit 2d06c5856d
1 changed files with 5 additions and 0 deletions

5
port.c
View File

@ -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;