]>
Commit | Line | Data |
---|---|---|
7f651772 | 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 | |
3 | @@ -44,6 +44,7 @@ | |
4 | #include <linux/notifier.h> | |
5 | #include <linux/init.h> | |
6 | #include <net/ip.h> | |
7 | +#include <net/netlink.h> | |
8 | #include <linux/ipv6.h> | |
9 | #include <net/route.h> | |
10 | #include <linux/skbuff.h> | |
11 | @@ -140,7 +141,7 @@ | |
12 | switch (skb->protocol) { | |
13 | case __constant_htons(ETH_P_IP): | |
14 | { | |
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)) && | |
20 | @@ -156,7 +157,7 @@ | |
21 | } | |
22 | case __constant_htons(ETH_P_IPV6): | |
23 | { | |
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); | |
29 | @@ -616,7 +617,7 @@ | |
30 | static int esfq_dump(struct Qdisc *sch, struct sk_buff *skb) | |
31 | { | |
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; | |
36 | ||
37 | opt.quantum = q->quantum; | |
38 | @@ -632,7 +633,7 @@ | |
39 | return skb->len; | |
40 | ||
41 | rtattr_failure: | |
42 | - skb_trim(skb, b - skb->data); | |
43 | + nlmsg_trim(skb, b); | |
44 | return -1; | |
45 | } | |
46 |