diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-06-14 10:28:17 +0200 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-06-14 22:33:00 +0400 |
commit | eee776f964046803911a5d9aa234e7757c82153b (patch) | |
tree | d859c736f32b9e260529838bfdd3303d0364460a /accel-pppd | |
parent | f94444646b54259c11dc7e8dbebdcf834a0250cc (diff) | |
download | accel-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.h | 4 |
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; } |