l2tpd_packet: correct digest, the first byte must be zero in the message

the first byte is the type of digest (hmac-md5)
This commit is contained in:
Alexander Couzens 2016-10-24 18:58:40 +02:00
parent ec03bf207a
commit 22bdaae934
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ static int digest_avp_update(struct msgb *msg)
* local/remote nonce? */
hmac_res = HMAC(EVP_md5(), digest_key, sizeof(digest_key),
(const uint8_t *)l2h, len, NULL, NULL);
memcpy(ah->value, hmac_res, 16);
memcpy(ah->value + 1, hmac_res, 16);
DEBUGP(DL2TP, "Tx Message with digest: %s\n", msgb_hexdump(msg));
return 0;