there was no check CoAP version.
it has to check by spec
Change-Id: I485779a0aef88cb18369f5b1842f06d19eadddcd
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2206
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
return NULL;
}
+ if (outpdu->hdr->version != COAP_DEFAULT_VERSION)
+ {
+ OIC_LOG_V(ERROR, TAG, "coap version is not available : %d",
+ outpdu->hdr->version);
+ coap_delete_pdu(outpdu);
+ return NULL;
+ }
+
if (outCode)
{
(*outCode) = (uint32_t) CA_RESPONSE_CODE(outpdu->hdr->code);