summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-06-14 10:28:17 +0200
committerKozlov Dmitry <xeb@mail.ru>2013-06-14 22:33:37 +0400
commite469853f88614a50fd4a1b05f6b0e5ec5a61883f (patch)
treed93a577ffbc2ad34fe0116f2b6c62393bfc18b93
parentca1d56ccb766ea9a855faaac5a757de913b73c77 (diff)
downloadaccel-ppp-xebd-e469853f88614a50fd4a1b05f6b0e5ec5a61883f.tar.gz
accel-ppp-xebd-e469853f88614a50fd4a1b05f6b0e5ec5a61883f.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>
-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 4227bad..a5645ee 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;
}