/[linux-patches]/genpatches-2.6/tags/2.6.20-9/1701_netfilter-ulog-alignment.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.20-9/1701_netfilter-ulog-alignment.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 927 - (show annotations) (download)
Thu Apr 26 15:33:43 2007 UTC (7 years, 4 months ago) by phreak
File size: 1437 byte(s)
2.6.20-9 release
1 From: Patrick McHardy <kaber@trash.net>
2 Date: Thu, 12 Apr 2007 21:27:03 +0000 (-0700)
3 Subject: [NETFILTER]: ipt_ULOG: use put_unaligned
4 X-Git-Tag: v2.6.21-rc7~11^2~5
5 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=01102e7ca2e71ec0c300d41a1f3e594235b733ee
6
7 [NETFILTER]: ipt_ULOG: use put_unaligned
8
9 Use put_unaligned to fix warnings about unaligned accesses.
10
11 Signed-off-by: Patrick McHardy <kaber@trash.net>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14
15 diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
16 index a26404d..9acc018 100644
17 --- a/net/ipv4/netfilter/ipt_ULOG.c
18 +++ b/net/ipv4/netfilter/ipt_ULOG.c
19 @@ -61,6 +61,7 @@
20 #include <linux/netfilter_ipv4/ipt_ULOG.h>
21 #include <net/sock.h>
22 #include <linux/bitops.h>
23 +#include <asm/unaligned.h>
24
25 MODULE_LICENSE("GPL");
26 MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
27 @@ -236,9 +237,9 @@ static void ipt_ulog_packet(unsigned int hooknum,
28
29 /* copy hook, prefix, timestamp, payload, etc. */
30 pm->data_len = copy_len;
31 - pm->timestamp_sec = skb->tstamp.off_sec;
32 - pm->timestamp_usec = skb->tstamp.off_usec;
33 - pm->mark = skb->mark;
34 + put_unaligned(skb->tstamp.off_sec, &pm->timestamp_sec);
35 + put_unaligned(skb->tstamp.off_usec, &pm->timestamp_usec);
36 + put_unaligned(skb->mark, &pm->mark);
37 pm->hook = hooknum;
38 if (prefix != NULL)
39 strncpy(pm->prefix, prefix, sizeof(pm->prefix));

  ViewVC Help
Powered by ViewVC 1.1.20