1 --- linux-2.6.21/net/sched/sch_esfq.c 2007-06-17 21:57:23.000000000 -0700
2 +++ linux-2.6.22-rc5/net/sched/sch_esfq.c 2007-06-17 22:04:03.000000000 -0700
4 #include <linux/notifier.h>
5 #include <linux/init.h>
7 +#include <net/netlink.h>
8 #include <linux/ipv6.h>
10 #include <linux/skbuff.h>
12 switch (skb->protocol) {
13 case __constant_htons(ETH_P_IP):
15 - struct iphdr *iph = skb->nh.iph;
16 + struct iphdr *iph = ip_hdr(skb);
17 info.dst = iph->daddr;
18 info.src = iph->saddr;
19 if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
22 case __constant_htons(ETH_P_IPV6):
24 - struct ipv6hdr *iph = skb->nh.ipv6h;
25 + struct ipv6hdr *iph = ipv6_hdr(skb);
26 /* Hash ipv6 addresses into a u32. This isn't ideal,
27 * but the code is simple. */
28 info.dst = jhash2(iph->daddr.s6_addr32, 4, q->perturbation);
30 static int esfq_dump(struct Qdisc *sch, struct sk_buff *skb)
32 struct esfq_sched_data *q = qdisc_priv(sch);
33 - unsigned char *b = skb->tail;
34 + unsigned char *b = skb_tail_pointer(skb);
35 struct tc_esfq_qopt opt;
37 opt.quantum = q->quantum;
42 - skb_trim(skb, b - skb->data);