Discussion:
[Linuxptp-devel] [PATCH 0/6] Management message error checking
Geoff Salmon
2013-02-04 18:05:35 UTC
Permalink
This patch set sends more error messages for invalid management
messages. I've tried to minimize what's changed and only send error
messages in places where the code already detects the error or add new
tests only when necessary (ex: checking that a SET message isn't
empty). For TLVs that have invalid lengths, that is still detected in
tlv.c and the whole message is ignored before clock_manage is even
called.

The 4th patch also adds clock/port_management_set functions to prepare
for supporting the SET messages. I included the patch in this set
because adding the functions affects the way NOT_SUPPORTed errors
should be sent.

Geoff Salmon (6):
fixes typo port_managment_error -> port_management_error
factors out functions for sending mgmt errors from clock and port
send UNKNOWN_ID error for unknown management TLVs
adds clock/port_management_set functions
send NOT_SUPPORTED errors for all unhandled, known management IDs
send errors if mgmt tlv length doesn't match action

clock.c | 49 ++++++++++++++++++++++++++++++++++++++++++-------
port.c | 41 +++++++++++++++++++++++++++++++----------
port.h | 4 ++--
3 files changed, 75 insertions(+), 19 deletions(-)
--
1.8.1.2
Loading...