summaryrefslogtreecommitdiffstats
path: root/net/sched/act_ipt.c
diff options
context:
space:
mode:
authorPatrick McHardy2008-01-24 05:35:03 +0100
committerDavid S. Miller2008-01-29 00:11:21 +0100
commit1587bac49f8491b5006a78f8d726111b71757941 (patch)
tree753e9fb452917efd9da6751fa4c6a45442c9fb8d /net/sched/act_ipt.c
parent[NET_SCHED]: Use typeful attribute construction helpers (diff)
downloadkernel-qcow2-linux-1587bac49f8491b5006a78f8d726111b71757941.tar.gz
kernel-qcow2-linux-1587bac49f8491b5006a78f8d726111b71757941.tar.xz
kernel-qcow2-linux-1587bac49f8491b5006a78f8d726111b71757941.zip
[NET_SCHED]: Use typeful attribute parsing helpers
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_ipt.c')
-rw-r--r--net/sched/act_ipt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 5dd701a7bc56..7ab2419b44ec 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -123,7 +123,7 @@ static int tcf_ipt_init(struct nlattr *nla, struct nlattr *est,
if (tb[TCA_IPT_INDEX] != NULL &&
nla_len(tb[TCA_IPT_INDEX]) >= sizeof(u32))
- index = *(u32 *)nla_data(tb[TCA_IPT_INDEX]);
+ index = nla_get_u32(tb[TCA_IPT_INDEX]);
pc = tcf_hash_check(index, a, bind, &ipt_hash_info);
if (!pc) {
@@ -140,7 +140,7 @@ static int tcf_ipt_init(struct nlattr *nla, struct nlattr *est,
}
ipt = to_ipt(pc);
- hook = *(u32 *)nla_data(tb[TCA_IPT_HOOK]);
+ hook = nla_get_u32(tb[TCA_IPT_HOOK]);
err = -ENOMEM;
tname = kmalloc(IFNAMSIZ, GFP_KERNEL);