提交 01102e7c 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[NETFILTER]: ipt_ULOG: use put_unaligned

Use put_unaligned to fix warnings about unaligned accesses.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 80584ff3
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
#include <linux/netfilter_ipv4/ipt_ULOG.h> #include <linux/netfilter_ipv4/ipt_ULOG.h>
#include <net/sock.h> #include <net/sock.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <asm/unaligned.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>"); MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
...@@ -236,9 +237,9 @@ static void ipt_ulog_packet(unsigned int hooknum, ...@@ -236,9 +237,9 @@ static void ipt_ulog_packet(unsigned int hooknum,
/* copy hook, prefix, timestamp, payload, etc. */ /* copy hook, prefix, timestamp, payload, etc. */
pm->data_len = copy_len; pm->data_len = copy_len;
pm->timestamp_sec = skb->tstamp.off_sec; put_unaligned(skb->tstamp.off_sec, &pm->timestamp_sec);
pm->timestamp_usec = skb->tstamp.off_usec; put_unaligned(skb->tstamp.off_usec, &pm->timestamp_usec);
pm->mark = skb->mark; put_unaligned(skb->mark, &pm->mark);
pm->hook = hooknum; pm->hook = hooknum;
if (prefix != NULL) if (prefix != NULL)
strncpy(pm->prefix, prefix, sizeof(pm->prefix)); strncpy(pm->prefix, prefix, sizeof(pm->prefix));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册