From cdd11b744b031c886ac3ae02a17e3e1c1bbe5b3a Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 10 Sep 2015 11:49:28 +0200 Subject: [PATCH] port: print bogus delay request message as rate limited info. Upgrade the message level to info so the user can see it, but print it at most once per 5 minutes to not spam the syslog too much. Signed-off-by: Miroslav Lichvar --- port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port.c b/port.c index 9c804cf..3f32433 100644 --- a/port.c +++ b/port.c @@ -1688,8 +1688,8 @@ static void process_delay_resp(struct port *p, struct ptp_message *m) } if (rsp->hdr.logMessageInterval < -10 || rsp->hdr.logMessageInterval > 22) { - pr_debug("port %hu: ignore bogus delay request interval 2^%d", - portnum(p), rsp->hdr.logMessageInterval); + pl_info(300, "port %hu: ignore bogus delay request interval 2^%d", + portnum(p), rsp->hdr.logMessageInterval); return; } p->logMinDelayReqInterval = rsp->hdr.logMessageInterval;