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 <mlichvar@redhat.com>
master
Miroslav Lichvar 2015-09-10 11:49:28 +02:00 committed by Richard Cochran
parent ddd653e7a9
commit cdd11b744b
1 changed files with 2 additions and 2 deletions

4
port.c
View File

@ -1688,8 +1688,8 @@ static void process_delay_resp(struct port *p, struct ptp_message *m)
} }
if (rsp->hdr.logMessageInterval < -10 || if (rsp->hdr.logMessageInterval < -10 ||
rsp->hdr.logMessageInterval > 22) { rsp->hdr.logMessageInterval > 22) {
pr_debug("port %hu: ignore bogus delay request interval 2^%d", pl_info(300, "port %hu: ignore bogus delay request interval 2^%d",
portnum(p), rsp->hdr.logMessageInterval); portnum(p), rsp->hdr.logMessageInterval);
return; return;
} }
p->logMinDelayReqInterval = rsp->hdr.logMessageInterval; p->logMinDelayReqInterval = rsp->hdr.logMessageInterval;