Added decrypting/decoding/parsing of SPA data.

git-svn-id: file:///home/mbr/svn/fwknop/trunk@24 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
Damien Stuart
2008-12-28 03:08:04 +00:00
parent 620ffec5cc
commit a4e82aa68f
14 changed files with 467 additions and 35 deletions

View File

@@ -59,6 +59,20 @@ int fko_set_spa_nat_access(fko_ctx_t *ctx, const char *msg)
if(ctx->nat_access == NULL)
return(FKO_ERROR_MEMORY_ALLOCATION);
/* If we set the nat_access message Then we force the message_type
* as well. Technically, the message type should be set already.
* This will serve a half-protective measure.
* --DSS XXX: should do this better.
*/
if(ctx->client_timeout > 0)
{
if(ctx->message_type != FKO_CLIENT_TIMEOUT_LOCAL_NAT_ACCESS_MSG)
ctx->message_type = FKO_CLIENT_TIMEOUT_NAT_ACCESS_MSG;
}
else
if(ctx->message_type != FKO_LOCAL_NAT_ACCESS_MSG)
ctx->message_type = FKO_NAT_ACCESS_MSG;
return(FKO_SUCCESS);
}