X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fsched%2Fact_pedit.c;h=b46fab5fb323a131946ce418b6d97c8889a941f3;hb=23248005fbe5fa32a3f6d00cdec1ecfb115d28eb;hp=53aa96cd579b8a0575166a77ad9973b1f816d059;hpb=d9bc125caf592b7d081021f32ce5b717efdf70c8;p=linux-2.6-omap-h63xx.git diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index 53aa96cd579..b46fab5fb32 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -9,26 +9,15 @@ * Authors: Jamal Hadi Salim (2002-4) */ -#include -#include -#include #include #include -#include #include -#include -#include -#include -#include #include -#include -#include #include #include #include #include -#include -#include +#include #include #include #include @@ -137,7 +126,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a, } } - pptr = skb->nh.raw; + pptr = skb_network_header(skb); spin_lock(&p->tcf_lock); @@ -164,8 +153,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a, printk("offset must be on 32 bit boundaries\n"); goto bad; } - if (skb->len < 0 || - (offset > 0 && offset > skb->len)) { + if (offset > 0 && offset > skb->len) { printk("offset %d cant exceed pkt length %d\n", offset, skb->len); goto bad; @@ -196,7 +184,7 @@ done: static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) { - unsigned char *b = skb->tail; + unsigned char *b = skb_tail_pointer(skb); struct tcf_pedit *p = a->priv; struct tc_pedit *opt; struct tcf_t t; @@ -227,7 +215,7 @@ static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a, return skb->len; rtattr_failure: - skb_trim(skb, b - skb->data); + nlmsg_trim(skb, b); kfree(opt); return -1; }