From 0f7cb0caf4a059efc7c9f46e088b0a36ab7ab9eb Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Tue, 19 Feb 2013 09:31:34 +0100 Subject: [PATCH] reject PB-Experimental messages with NOSKIP flag set --- src/libcharon/plugins/tnccs_20/batch/pb_tnc_batch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcharon/plugins/tnccs_20/batch/pb_tnc_batch.c b/src/libcharon/plugins/tnccs_20/batch/pb_tnc_batch.c index 3a2c70f5a..b1f6d1eaa 100644 --- a/src/libcharon/plugins/tnccs_20/batch/pb_tnc_batch.c +++ b/src/libcharon/plugins/tnccs_20/batch/pb_tnc_batch.c @@ -386,6 +386,13 @@ static status_t process_tnc_msg(private_pb_tnc_batch_t *this) } else { + if (msg_type == PB_MSG_EXPERIMENTAL && noskip_flag) + { + DBG1(DBG_TNC, "reject PB-Experimental message with NOSKIP flag set"); + msg = pb_error_msg_create_with_offset(TRUE, PEN_IETF, + PB_ERROR_UNSUPPORTED_MANDATORY_MSG, this->offset); + goto fatal; + } if (pb_tnc_msg_infos[msg_type].has_noskip_flag != TRUE_OR_FALSE && pb_tnc_msg_infos[msg_type].has_noskip_flag != noskip_flag) {