diff options
author | Patrick McHardy <kaber@trash.net> | 2007-04-12 17:27:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-04-12 17:27:03 -0400 |
commit | 01102e7ca2e71ec0c300d41a1f3e594235b733ee (patch) | |
tree | 99d68d06670c0ee94da60e7a1035ca9f3e589692 /net | |
parent | 80584ff3b99c36ead7e130e453b3a48b18072d18 (diff) |
[NETFILTER]: ipt_ULOG: use put_unaligned
Use put_unaligned to fix warnings about unaligned accesses.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ipt_ULOG.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index a26404dbe212..9acc018766f2 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/netfilter_ipv4/ipt_ULOG.h> | 61 | #include <linux/netfilter_ipv4/ipt_ULOG.h> |
62 | #include <net/sock.h> | 62 | #include <net/sock.h> |
63 | #include <linux/bitops.h> | 63 | #include <linux/bitops.h> |
64 | #include <asm/unaligned.h> | ||
64 | 65 | ||
65 | MODULE_LICENSE("GPL"); | 66 | MODULE_LICENSE("GPL"); |
66 | MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>"); | 67 | MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>"); |
@@ -236,9 +237,9 @@ static void ipt_ulog_packet(unsigned int hooknum, | |||
236 | 237 | ||
237 | /* copy hook, prefix, timestamp, payload, etc. */ | 238 | /* copy hook, prefix, timestamp, payload, etc. */ |
238 | pm->data_len = copy_len; | 239 | pm->data_len = copy_len; |
239 | pm->timestamp_sec = skb->tstamp.off_sec; | 240 | put_unaligned(skb->tstamp.off_sec, &pm->timestamp_sec); |
240 | pm->timestamp_usec = skb->tstamp.off_usec; | 241 | put_unaligned(skb->tstamp.off_usec, &pm->timestamp_usec); |
241 | pm->mark = skb->mark; | 242 | put_unaligned(skb->mark, &pm->mark); |
242 | pm->hook = hooknum; | 243 | pm->hook = hooknum; |
243 | if (prefix != NULL) | 244 | if (prefix != NULL) |
244 | strncpy(pm->prefix, prefix, sizeof(pm->prefix)); | 245 | strncpy(pm->prefix, prefix, sizeof(pm->prefix)); |