summaryrefslogtreecommitdiff
path: root/fticks.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-04-05 09:49:47 +0200
committerLinus Nordberg <linus@nordu.net>2011-04-05 09:49:47 +0200
commitdb02df7229ba28df37677cb1bab66749b513d943 (patch)
treeed727f708aa1864f75956040c3466a88058e7b09 /fticks.c
parent369aef553267ddee30b7560f247750c344797282 (diff)
Do save vendor part of MAC for FTicksMac VendorHashed and VendorKeyHashed.
Diffstat (limited to 'fticks.c')
-rw-r--r--fticks.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fticks.c b/fticks.c
index c3b9c05..7cbbb46 100644
--- a/fticks.c
+++ b/fticks.c
@@ -189,11 +189,13 @@ fticks_log(const struct options *options,
memcpy(macout, macin, sizeof(macout));
break;
case RSP_FTICKS_MAC_VENDOR_HASHED:
- fticks_hashmac(macin + 3, NULL, sizeof(macout), macout);
+ memcpy(macout, macin, 9);
+ fticks_hashmac(macin + 9, NULL, sizeof(macout) - 9, macout + 9);
break;
case RSP_FTICKS_MAC_VENDOR_KEY_HASHED:
- fticks_hashmac(macin + 3, options->fticks_key, sizeof(macout),
- macout);
+ memcpy(macout, macin, 9);
+ fticks_hashmac(macin + 9, options->fticks_key,
+ sizeof(macout) - 9, macout + 9);
break;
case RSP_FTICKS_MAC_FULLY_HASHED:
fticks_hashmac(macin, NULL, sizeof(macout), macout);