diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 08:39:20 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 08:39:20 -0800 |
commit | b55813a2e50088ca30df33fa62aeed5d3adb1796 (patch) | |
tree | be50fe404e94869fe854766e190a5753dbc7dd49 /net/bridge/br_stp_bpdu.c | |
parent | 368d17e068f691dba5a4f122c271db5ec9b2ebd6 (diff) | |
parent | 9e19bb6d7a0959f5028d46e1ab99c50f0d36eda8 (diff) | |
download | blackbird-op-linux-b55813a2e50088ca30df33fa62aeed5d3adb1796.tar.gz blackbird-op-linux-b55813a2e50088ca30df33fa62aeed5d3adb1796.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[NETFILTER] x_table.c: sem2mutex
[IPV4]: Aggregate route entries with different TOS values
[TCP]: Mark tcp_*mem[] __read_mostly.
[TCP]: Set default max buffers from memory pool size
[SCTP]: Fix up sctp_rcv return value
[NET]: Take RTNL when unregistering notifier
[WIRELESS]: Fix config dependencies.
[NET]: Fill in a 32-bit hole in struct sock on 64-bit platforms.
[NET]: Ensure device name passed to SO_BINDTODEVICE is NULL terminated.
[MODULES]: Don't allow statically declared exports
[BRIDGE]: Unaligned accesses in the ethernet bridge
Diffstat (limited to 'net/bridge/br_stp_bpdu.c')
-rw-r--r-- | net/bridge/br_stp_bpdu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c index 8934a54792be..a7ba0cce0b46 100644 --- a/net/bridge/br_stp_bpdu.c +++ b/net/bridge/br_stp_bpdu.c @@ -19,6 +19,7 @@ #include <linux/llc.h> #include <net/llc.h> #include <net/llc_pdu.h> +#include <asm/unaligned.h> #include "br_private.h" #include "br_private_stp.h" @@ -59,12 +60,12 @@ static inline void br_set_ticks(unsigned char *dest, int j) { unsigned long ticks = (STP_HZ * j)/ HZ; - *((__be16 *) dest) = htons(ticks); + put_unaligned(htons(ticks), (__be16 *)dest); } static inline int br_get_ticks(const unsigned char *src) { - unsigned long ticks = ntohs(*(__be16 *)src); + unsigned long ticks = ntohs(get_unaligned((__be16 *)src)); return (ticks * HZ + STP_HZ - 1) / STP_HZ; } |