mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 15:42:32 +00:00
[NET]: skb_trim audit
I found a few more spots where pskb_trim_rcsum could be used but were not. This patch changes them to use it. Also, sk_filter can get paged skb data. Therefore we must use pskb_trim instead of skb_trim. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c8c9f9a3de
commit
b38dfee3d6
3 changed files with 7 additions and 22 deletions
|
@ -456,13 +456,9 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb,
|
|||
DEBUGP("queue: message is too short.\n");
|
||||
goto err;
|
||||
}
|
||||
if (end-offset < skb->len) {
|
||||
if (pskb_trim(skb, end - offset)) {
|
||||
DEBUGP("Can't trim\n");
|
||||
goto err;
|
||||
}
|
||||
if (skb->ip_summed != CHECKSUM_UNNECESSARY)
|
||||
skb->ip_summed = CHECKSUM_NONE;
|
||||
if (pskb_trim_rcsum(skb, end - offset)) {
|
||||
DEBUGP("Can't trim\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Find out which fragments are in front and at the back of us
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue