The line
skb=(struct sk_buff *)(bptr+size)-1;
should ideally say skb= ((struct sk_buff *)(bptr+size)) - 1; ie subtract one from a pointer to sk_buff. If you subtract one from a sk_buff pointer pointing to bptr+size you will get a pointer to a sk_buff just before the end. -Ranjit
|