X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=net%2Fsched%2Fcls_fw.c;h=bbec4a0d4dcb006dc342a3bb91c3bd437298e035;hb=abdba717253382a669af9c719313ec602cc95a2d;hp=5dbb9d451f7300a0620019656f695dbe0506ab78;hpb=a22a0fab32e1216df56e4b9a577dc5c922cf7524;p=powerpc.git diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index 5dbb9d451f..bbec4a0d4d 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -348,7 +349,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, { struct fw_head *head = (struct fw_head *)tp->root; struct fw_filter *f = (struct fw_filter*)fh; - unsigned char *b = skb->tail; + unsigned char *b = skb_tail_pointer(skb); struct rtattr *rta; if (f == NULL) @@ -374,7 +375,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, if (tcf_exts_dump(skb, &f->exts, &fw_ext_map) < 0) goto rtattr_failure; - rta->rta_len = skb->tail - b; + rta->rta_len = skb_tail_pointer(skb) - b; if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0) goto rtattr_failure; @@ -382,7 +383,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, return skb->len; rtattr_failure: - skb_trim(skb, b - skb->data); + nlmsg_trim(skb, b); return -1; }