Answer all management requests with 'not supported'

Our management interface is not yet terribly useful,
but at least we are honest about it.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-08-02 07:32:15 +02:00
parent 21c2fe30c7
commit 353b0a2743
2 changed files with 8 additions and 0 deletions

View File

@ -349,6 +349,7 @@ void clock_manage(struct clock *c, struct port *p, struct ptp_message *msg)
int i, pdulen;
struct port *fwd;
struct management_tlv *mgt;
struct PortIdentity pid;
struct ClockIdentity *tcid, wildcard = {
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
};
@ -408,6 +409,10 @@ void clock_manage(struct clock *c, struct port *p, struct ptp_message *msg)
case ALTERNATE_TIME_OFFSET_PROPERTIES:
case TRANSPARENT_CLOCK_DEFAULT_DATA_SET:
case PRIMARY_DOMAIN:
pid.clockIdentity = clock_identity(c);
pid.portNumber = 0;
if (port_managment_error(pid, p, msg, NOT_SUPPORTED))
pr_err("failed to send management error status");
break;
default:
for (i = 0; i < c->nports; i++) {

3
port.c
View File

@ -1383,6 +1383,9 @@ int port_manage(struct port *p, struct port *ingress, struct ptp_message *msg)
case TRANSPARENT_CLOCK_PORT_DATA_SET:
case DELAY_MECHANISM:
case LOG_MIN_PDELAY_REQ_INTERVAL:
if (port_managment_error(p->portIdentity, ingress, msg,
NOT_SUPPORTED))
pr_err("port %hu: management error failed", portnum(p));
break;
default:
return -1;