diff --git a/clock.c b/clock.c index 3aa2407..10fa4b6 100644 --- a/clock.c +++ b/clock.c @@ -848,10 +848,6 @@ int clock_manage(struct clock *c, struct port *p, struct ptp_message *msg) return changed; break; case COMMAND: - if (mgt->length != 2) { - clock_management_send_error(p, msg, WRONG_LENGTH); - return changed; - } break; default: return changed; diff --git a/tlv.c b/tlv.c index f32514f..b8cdd39 100644 --- a/tlv.c +++ b/tlv.c @@ -242,6 +242,15 @@ static int mgt_post_recv(struct management_tlv *m, uint16_t data_len, pdsnp->neighborPropDelayThresh = ntohl(pdsnp->neighborPropDelayThresh); pdsnp->asCapable = ntohl(pdsnp->asCapable); break; + case SAVE_IN_NON_VOLATILE_STORAGE: + case RESET_NON_VOLATILE_STORAGE: + case INITIALIZE: + case FAULT_LOG_RESET: + case ENABLE_PORT: + case DISABLE_PORT: + if (data_len != 0) + goto bad_length; + break; } if (extra_len) { if (extra_len % 2)