summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-06-14 10:28:17 +0200
committerDmitry Kozlov <xeb@mail.ru>2013-06-14 22:33:00 +0400
commiteee776f964046803911a5d9aa234e7757c82153b (patch)
treed859c736f32b9e260529838bfdd3303d0364460a /accel-pppd
parentf94444646b54259c11dc7e8dbebdcf834a0250cc (diff)
downloadaccel-ppp-eee776f964046803911a5d9aa234e7757c82153b.tar.gz
accel-ppp-eee776f964046803911a5d9aa234e7757c82153b.zip
connlimit: Fix size of memcpy() for MAC address
The 'hw' parameter of cl_key_from_mac() is actually a pointer, so 'key.hw' must be used instead to compute the size of the MAC address. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/include/connlimit.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/include/connlimit.h b/accel-pppd/include/connlimit.h
index 4227bad1..a5645ee2 100644
--- a/accel-pppd/include/connlimit.h
+++ b/accel-pppd/include/connlimit.h
@@ -12,8 +12,8 @@ static inline uint64_t cl_key_from_mac(uint8_t hw[6])
uint8_t hw[6];
uint64_t key;
} key;
-
- memcpy(key.hw, hw, sizeof(hw));
+
+ memcpy(key.hw, hw, sizeof(key.hw));
return key.key;
}