]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/sched/sch_sfq.c
[SK_BUFF]: Convert skb->tail to sk_buff_data_t
[net-next-2.6.git] / net / sched / sch_sfq.c
index 66f32051a99b4b182adf0db17fdb0c29ae67c3c8..a511ba83e26f8045b2ba35f6d9d34641a3595831 100644 (file)
@@ -137,7 +137,7 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
        switch (skb->protocol) {
        case __constant_htons(ETH_P_IP):
        {
-               struct iphdr *iph = skb->nh.iph;
+               const struct iphdr *iph = ip_hdr(skb);
                h = iph->daddr;
                h2 = iph->saddr^iph->protocol;
                if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
@@ -152,7 +152,7 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
        }
        case __constant_htons(ETH_P_IPV6):
        {
-               struct ipv6hdr *iph = skb->nh.ipv6h;
+               struct ipv6hdr *iph = ipv6_hdr(skb);
                h = iph->daddr.s6_addr32[3];
                h2 = iph->saddr.s6_addr32[3]^iph->nexthdr;
                if (iph->nexthdr == IPPROTO_TCP ||
@@ -461,7 +461,7 @@ static void sfq_destroy(struct Qdisc *sch)
 static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)
 {
        struct sfq_sched_data *q = qdisc_priv(sch);
-       unsigned char    *b = skb->tail;
+       unsigned char *b = skb_tail_pointer(skb);
        struct tc_sfq_qopt opt;
 
        opt.quantum = q->quantum;