diff options
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r-- | net/sched/cls_api.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 5c6ffdb77d2d..84231baf77d1 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -323,7 +323,7 @@ tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh, | |||
323 | { | 323 | { |
324 | struct tcmsg *tcm; | 324 | struct tcmsg *tcm; |
325 | struct nlmsghdr *nlh; | 325 | struct nlmsghdr *nlh; |
326 | unsigned char *b = skb->tail; | 326 | unsigned char *b = skb_tail_pointer(skb); |
327 | 327 | ||
328 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); | 328 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
329 | tcm = NLMSG_DATA(nlh); | 329 | tcm = NLMSG_DATA(nlh); |
@@ -340,7 +340,7 @@ tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh, | |||
340 | if (tp->ops->dump && tp->ops->dump(tp, fh, skb, tcm) < 0) | 340 | if (tp->ops->dump && tp->ops->dump(tp, fh, skb, tcm) < 0) |
341 | goto rtattr_failure; | 341 | goto rtattr_failure; |
342 | } | 342 | } |
343 | nlh->nlmsg_len = skb->tail - b; | 343 | nlh->nlmsg_len = skb_tail_pointer(skb) - b; |
344 | return skb->len; | 344 | return skb->len; |
345 | 345 | ||
346 | nlmsg_failure: | 346 | nlmsg_failure: |
@@ -563,30 +563,30 @@ tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts, | |||
563 | * to work with both old and new modes of entering | 563 | * to work with both old and new modes of entering |
564 | * tc data even if iproute2 was newer - jhs | 564 | * tc data even if iproute2 was newer - jhs |
565 | */ | 565 | */ |
566 | struct rtattr * p_rta = (struct rtattr*) skb->tail; | 566 | struct rtattr *p_rta = (struct rtattr *)skb_tail_pointer(skb); |
567 | 567 | ||
568 | if (exts->action->type != TCA_OLD_COMPAT) { | 568 | if (exts->action->type != TCA_OLD_COMPAT) { |
569 | RTA_PUT(skb, map->action, 0, NULL); | 569 | RTA_PUT(skb, map->action, 0, NULL); |
570 | if (tcf_action_dump(skb, exts->action, 0, 0) < 0) | 570 | if (tcf_action_dump(skb, exts->action, 0, 0) < 0) |
571 | goto rtattr_failure; | 571 | goto rtattr_failure; |
572 | p_rta->rta_len = skb->tail - (u8*)p_rta; | 572 | p_rta->rta_len = skb_tail_pointer(skb) - (u8 *)p_rta; |
573 | } else if (map->police) { | 573 | } else if (map->police) { |
574 | RTA_PUT(skb, map->police, 0, NULL); | 574 | RTA_PUT(skb, map->police, 0, NULL); |
575 | if (tcf_action_dump_old(skb, exts->action, 0, 0) < 0) | 575 | if (tcf_action_dump_old(skb, exts->action, 0, 0) < 0) |
576 | goto rtattr_failure; | 576 | goto rtattr_failure; |
577 | p_rta->rta_len = skb->tail - (u8*)p_rta; | 577 | p_rta->rta_len = skb_tail_pointer(skb) - (u8 *)p_rta; |
578 | } | 578 | } |
579 | } | 579 | } |
580 | #elif defined CONFIG_NET_CLS_POLICE | 580 | #elif defined CONFIG_NET_CLS_POLICE |
581 | if (map->police && exts->police) { | 581 | if (map->police && exts->police) { |
582 | struct rtattr * p_rta = (struct rtattr*) skb->tail; | 582 | struct rtattr *p_rta = (struct rtattr *)skb_tail_pointer(skb); |
583 | 583 | ||
584 | RTA_PUT(skb, map->police, 0, NULL); | 584 | RTA_PUT(skb, map->police, 0, NULL); |
585 | 585 | ||
586 | if (tcf_police_dump(skb, exts->police) < 0) | 586 | if (tcf_police_dump(skb, exts->police) < 0) |
587 | goto rtattr_failure; | 587 | goto rtattr_failure; |
588 | 588 | ||
589 | p_rta->rta_len = skb->tail - (u8*)p_rta; | 589 | p_rta->rta_len = skb_tail_pointer(skb) - (u8 *)p_rta; |
590 | } | 590 | } |
591 | #endif | 591 | #endif |
592 | return 0; | 592 | return 0; |