diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-21 01:47:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:10 -0400 |
commit | eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch) | |
tree | 4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /net/sched | |
parent | e023dd643798c4f06c16466af90b4d250e4b8bd7 (diff) |
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_rsvp.h | 2 | ||||
-rw-r--r-- | net/sched/sch_atm.c | 4 | ||||
-rw-r--r-- | net/sched/sch_dsmark.c | 4 | ||||
-rw-r--r-- | net/sched/sch_sfq.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index b6ac0e28787..cb8cf5bfa05 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h | |||
@@ -145,7 +145,7 @@ static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp, | |||
145 | #if RSVP_DST_LEN == 4 | 145 | #if RSVP_DST_LEN == 4 |
146 | struct ipv6hdr *nhptr = skb->nh.ipv6h; | 146 | struct ipv6hdr *nhptr = skb->nh.ipv6h; |
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: |
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index afb3bbd571f..baca8743c12 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -503,7 +503,7 @@ static void sch_atm_dequeue(unsigned long data) | |||
503 | } | 503 | } |
504 | D2PRINTK("atm_tc_dequeue: sending on class %p\n",flow); | 504 | D2PRINTK("atm_tc_dequeue: sending on class %p\n",flow); |
505 | /* remove any LL header somebody else has attached */ | 505 | /* remove any LL header somebody else has attached */ |
506 | skb_pull(skb,(char *) skb->nh.iph-(char *) skb->data); | 506 | skb_pull(skb, skb_network_offset(skb)); |
507 | if (skb_headroom(skb) < flow->hdr_len) { | 507 | if (skb_headroom(skb) < flow->hdr_len) { |
508 | struct sk_buff *new; | 508 | struct sk_buff *new; |
509 | 509 | ||
@@ -513,7 +513,7 @@ static void sch_atm_dequeue(unsigned long data) | |||
513 | skb = new; | 513 | skb = new; |
514 | } | 514 | } |
515 | D2PRINTK("sch_atm_dequeue: ip %p, data %p\n", | 515 | D2PRINTK("sch_atm_dequeue: ip %p, data %p\n", |
516 | skb->nh.iph,skb->data); | 516 | skb_network_header(skb), skb->data); |
517 | ATM_SKB(skb)->vcc = flow->vcc; | 517 | ATM_SKB(skb)->vcc = flow->vcc; |
518 | memcpy(skb_push(skb,flow->hdr_len),flow->hdr, | 518 | memcpy(skb_push(skb,flow->hdr_len),flow->hdr, |
519 | flow->hdr_len); | 519 | flow->hdr_len); |
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 96324cf4e6a..45b5734dd72 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -216,7 +216,7 @@ static int dsmark_enqueue(struct sk_buff *skb,struct Qdisc *sch) | |||
216 | /* FIXME: Safe with non-linear skbs? --RR */ | 216 | /* FIXME: Safe with non-linear skbs? --RR */ |
217 | switch (skb->protocol) { | 217 | switch (skb->protocol) { |
218 | case __constant_htons(ETH_P_IP): | 218 | case __constant_htons(ETH_P_IP): |
219 | skb->tc_index = ipv4_get_dsfield(skb->nh.iph) | 219 | skb->tc_index = ipv4_get_dsfield(ip_hdr(skb)) |
220 | & ~INET_ECN_MASK; | 220 | & ~INET_ECN_MASK; |
221 | break; | 221 | break; |
222 | case __constant_htons(ETH_P_IPV6): | 222 | case __constant_htons(ETH_P_IPV6): |
@@ -292,7 +292,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch) | |||
292 | 292 | ||
293 | switch (skb->protocol) { | 293 | switch (skb->protocol) { |
294 | case __constant_htons(ETH_P_IP): | 294 | case __constant_htons(ETH_P_IP): |
295 | ipv4_change_dsfield(skb->nh.iph, p->mask[index], | 295 | ipv4_change_dsfield(ip_hdr(skb), p->mask[index], |
296 | p->value[index]); | 296 | p->value[index]); |
297 | break; | 297 | break; |
298 | case __constant_htons(ETH_P_IPV6): | 298 | case __constant_htons(ETH_P_IPV6): |
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 66f32051a99..02081bc9e0d 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -137,7 +137,7 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb) | |||
137 | switch (skb->protocol) { | 137 | switch (skb->protocol) { |
138 | case __constant_htons(ETH_P_IP): | 138 | case __constant_htons(ETH_P_IP): |
139 | { | 139 | { |
140 | struct iphdr *iph = skb->nh.iph; | 140 | const struct iphdr *iph = ip_hdr(skb); |
141 | h = iph->daddr; | 141 | h = iph->daddr; |
142 | h2 = iph->saddr^iph->protocol; | 142 | h2 = iph->saddr^iph->protocol; |
143 | if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) && | 143 | if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) && |