send NOT_SUPPORTED errors for all unhandled, known management IDs
Now that there are clock/port_management_set functions, the IDs that GETs are handled for, like DEFUALT_DATA_SET, still need to be in the case for sending NOT_SUPPORTED errors. Signed-off-by: Geoff Salmon <gsalmon@se-instruments.com>master
parent
507bee9e73
commit
3921557672
9
clock.c
9
clock.c
|
@ -656,9 +656,7 @@ void clock_manage(struct clock *c, struct port *p, struct ptp_message *msg)
|
|||
break;
|
||||
case COMMAND:
|
||||
break;
|
||||
case RESPONSE:
|
||||
case ACKNOWLEDGE:
|
||||
/* Ignore responses from other nodes. */
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -669,6 +667,10 @@ void clock_manage(struct clock *c, struct port *p, struct ptp_message *msg)
|
|||
case INITIALIZE:
|
||||
case FAULT_LOG:
|
||||
case FAULT_LOG_RESET:
|
||||
case DEFAULT_DATA_SET:
|
||||
case CURRENT_DATA_SET:
|
||||
case PARENT_DATA_SET:
|
||||
case TIME_PROPERTIES_DATA_SET:
|
||||
case PRIORITY1:
|
||||
case PRIORITY2:
|
||||
case DOMAIN:
|
||||
|
@ -689,6 +691,7 @@ 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:
|
||||
case TIME_STATUS_NP:
|
||||
clock_management_send_error(p, msg, NOT_SUPPORTED);
|
||||
break;
|
||||
default:
|
||||
|
|
6
port.c
6
port.c
|
@ -1714,13 +1714,15 @@ int port_manage(struct port *p, struct port *ingress, struct ptp_message *msg)
|
|||
return 0;
|
||||
break;
|
||||
case COMMAND:
|
||||
case RESPONSE:
|
||||
case ACKNOWLEDGE:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (mgt->id) {
|
||||
case NULL_MANAGEMENT:
|
||||
case CLOCK_DESCRIPTION:
|
||||
case PORT_DATA_SET:
|
||||
case LOG_ANNOUNCE_INTERVAL:
|
||||
case ANNOUNCE_RECEIPT_TIMEOUT:
|
||||
case LOG_SYNC_INTERVAL:
|
||||
|
|
Loading…
Reference in New Issue