aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding/payloads/nonce_payload.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-10-29 10:09:39 +0100
committerMartin Willi <martin@revosec.ch>2014-06-04 15:53:03 +0200
commit3ecfc83c6be2e96d01bf8ee805737e9e14262a01 (patch)
tree30dc063d27f594158ae6b1773b24bb32f44374a8 /src/libcharon/encoding/payloads/nonce_payload.c
parent396baeaea257608655f91a824ddfcbb3fa01e7a5 (diff)
downloadstrongswan-3ecfc83c6be2e96d01bf8ee805737e9e14262a01.tar.bz2
strongswan-3ecfc83c6be2e96d01bf8ee805737e9e14262a01.tar.xz
payload: Use common prefixes for all payload type identifiers
The old identifiers did not use a proper namespace and often clashed with other defines.
Diffstat (limited to 'src/libcharon/encoding/payloads/nonce_payload.c')
-rw-r--r--src/libcharon/encoding/payloads/nonce_payload.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcharon/encoding/payloads/nonce_payload.c b/src/libcharon/encoding/payloads/nonce_payload.c
index 3c5eeb535..b0d1c601a 100644
--- a/src/libcharon/encoding/payloads/nonce_payload.c
+++ b/src/libcharon/encoding/payloads/nonce_payload.c
@@ -60,7 +60,7 @@ struct private_nonce_payload_t {
chunk_t nonce;
/**
- * Payload type, NONCE or NONCE_V1
+ * Payload type, PLV2_NONCE or PLV1_NONCE
*/
payload_type_t type;
};
@@ -110,12 +110,12 @@ METHOD(payload_t, verify, status_t,
{
bad_length = TRUE;
}
- if (this->type == NONCE &&
+ if (this->type == PLV2_NONCE &&
this->nonce.len < 16)
{
bad_length = TRUE;
}
- if (this->type == NONCE_V1 &&
+ if (this->type == PLV1_NONCE &&
this->nonce.len < 8)
{
bad_length = TRUE;
@@ -209,7 +209,7 @@ nonce_payload_t *nonce_payload_create(payload_type_t type)
.get_nonce = _get_nonce,
.destroy = _destroy,
},
- .next_payload = NO_PAYLOAD,
+ .next_payload = PL_NONE,
.payload_length = get_header_length(this),
.type = type,
);