diff options
Diffstat (limited to 'net/sched/cls_u32.c')
-rw-r--r-- | net/sched/cls_u32.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 326711eb593c..a4e72e8a882f 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c | |||
@@ -474,7 +474,7 @@ static int u32_set_parms(struct tcf_proto *tp, unsigned long base, | |||
474 | 474 | ||
475 | err = -EINVAL; | 475 | err = -EINVAL; |
476 | if (tb[TCA_U32_LINK]) { | 476 | if (tb[TCA_U32_LINK]) { |
477 | u32 handle = *(u32*)nla_data(tb[TCA_U32_LINK]); | 477 | u32 handle = nla_get_u32(tb[TCA_U32_LINK]); |
478 | struct tc_u_hnode *ht_down = NULL; | 478 | struct tc_u_hnode *ht_down = NULL; |
479 | 479 | ||
480 | if (TC_U32_KEY(handle)) | 480 | if (TC_U32_KEY(handle)) |
@@ -496,7 +496,7 @@ static int u32_set_parms(struct tcf_proto *tp, unsigned long base, | |||
496 | ht_down->refcnt--; | 496 | ht_down->refcnt--; |
497 | } | 497 | } |
498 | if (tb[TCA_U32_CLASSID]) { | 498 | if (tb[TCA_U32_CLASSID]) { |
499 | n->res.classid = *(u32*)nla_data(tb[TCA_U32_CLASSID]); | 499 | n->res.classid = nla_get_u32(tb[TCA_U32_CLASSID]); |
500 | tcf_bind_filter(tp, &n->res, base); | 500 | tcf_bind_filter(tp, &n->res, base); |
501 | } | 501 | } |
502 | 502 | ||
@@ -543,7 +543,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
543 | } | 543 | } |
544 | 544 | ||
545 | if (tb[TCA_U32_DIVISOR]) { | 545 | if (tb[TCA_U32_DIVISOR]) { |
546 | unsigned divisor = *(unsigned*)nla_data(tb[TCA_U32_DIVISOR]); | 546 | unsigned divisor = nla_get_u32(tb[TCA_U32_DIVISOR]); |
547 | 547 | ||
548 | if (--divisor > 0x100) | 548 | if (--divisor > 0x100) |
549 | return -EINVAL; | 549 | return -EINVAL; |
@@ -569,7 +569,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
569 | } | 569 | } |
570 | 570 | ||
571 | if (tb[TCA_U32_HASH]) { | 571 | if (tb[TCA_U32_HASH]) { |
572 | htid = *(unsigned*)nla_data(tb[TCA_U32_HASH]); | 572 | htid = nla_get_u32(tb[TCA_U32_HASH]); |
573 | if (TC_U32_HTID(htid) == TC_U32_ROOT) { | 573 | if (TC_U32_HTID(htid) == TC_U32_ROOT) { |
574 | ht = tp->root; | 574 | ht = tp->root; |
575 | htid = ht->handle; | 575 | htid = ht->handle; |