diff options
Diffstat (limited to 'net/sched/cls_rsvp.h')
-rw-r--r-- | net/sched/cls_rsvp.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 7853621a04cc..22f9ede70e8f 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h | |||
@@ -143,9 +143,9 @@ static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp, | |||
143 | u8 tunnelid = 0; | 143 | u8 tunnelid = 0; |
144 | u8 *xprt; | 144 | u8 *xprt; |
145 | #if RSVP_DST_LEN == 4 | 145 | #if RSVP_DST_LEN == 4 |
146 | struct ipv6hdr *nhptr = skb->nh.ipv6h; | 146 | struct ipv6hdr *nhptr = ipv6_hdr(skb); |
147 | #else | 147 | #else |
148 | struct iphdr *nhptr = skb->nh.iph; | 148 | struct iphdr *nhptr = ip_hdr(skb); |
149 | #endif | 149 | #endif |
150 | 150 | ||
151 | restart: | 151 | restart: |
@@ -160,7 +160,7 @@ restart: | |||
160 | dst = &nhptr->daddr; | 160 | dst = &nhptr->daddr; |
161 | protocol = nhptr->protocol; | 161 | protocol = nhptr->protocol; |
162 | xprt = ((u8*)nhptr) + (nhptr->ihl<<2); | 162 | xprt = ((u8*)nhptr) + (nhptr->ihl<<2); |
163 | if (nhptr->frag_off&__constant_htons(IP_MF|IP_OFFSET)) | 163 | if (nhptr->frag_off & htons(IP_MF|IP_OFFSET)) |
164 | return -1; | 164 | return -1; |
165 | #endif | 165 | #endif |
166 | 166 | ||
@@ -593,7 +593,7 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, | |||
593 | { | 593 | { |
594 | struct rsvp_filter *f = (struct rsvp_filter*)fh; | 594 | struct rsvp_filter *f = (struct rsvp_filter*)fh; |
595 | struct rsvp_session *s; | 595 | struct rsvp_session *s; |
596 | unsigned char *b = skb->tail; | 596 | unsigned char *b = skb_tail_pointer(skb); |
597 | struct rtattr *rta; | 597 | struct rtattr *rta; |
598 | struct tc_rsvp_pinfo pinfo; | 598 | struct tc_rsvp_pinfo pinfo; |
599 | 599 | ||
@@ -623,14 +623,14 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, | |||
623 | if (tcf_exts_dump(skb, &f->exts, &rsvp_ext_map) < 0) | 623 | if (tcf_exts_dump(skb, &f->exts, &rsvp_ext_map) < 0) |
624 | goto rtattr_failure; | 624 | goto rtattr_failure; |
625 | 625 | ||
626 | rta->rta_len = skb->tail - b; | 626 | rta->rta_len = skb_tail_pointer(skb) - b; |
627 | 627 | ||
628 | if (tcf_exts_dump_stats(skb, &f->exts, &rsvp_ext_map) < 0) | 628 | if (tcf_exts_dump_stats(skb, &f->exts, &rsvp_ext_map) < 0) |
629 | goto rtattr_failure; | 629 | goto rtattr_failure; |
630 | return skb->len; | 630 | return skb->len; |
631 | 631 | ||
632 | rtattr_failure: | 632 | rtattr_failure: |
633 | skb_trim(skb, b - skb->data); | 633 | nlmsg_trim(skb, b); |
634 | return -1; | 634 | return -1; |
635 | } | 635 | } |
636 | 636 | ||