mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[IPV4]: Safer reassembly
Another spin of Herbert Xu's "safer ip reassembly" patch for 2.6.16. (The original patch is here: http://marc.theaimsgroup.com/?l=linux-netdev&m=112281936522415&w=2 and my only contribution is to have tested it.) This patch (optionally) does additional checks before accepting IP fragments, which can greatly reduce the possibility of reassembling fragments which originated from different IP datagrams. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Arthur Kepner <akepner@sgi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d5228a4f49
commit
89cee8b1cb
8 changed files with 106 additions and 1 deletions
|
@ -445,6 +445,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
|
|||
|
||||
hlen = iph->ihl * 4;
|
||||
mtu = dst_mtu(&rt->u.dst) - hlen; /* Size of data space */
|
||||
IPCB(skb)->flags |= IPSKB_FRAG_COMPLETE;
|
||||
|
||||
/* When frag_list is given, use it. First, check its validity:
|
||||
* some transformers could create wrong frag_list or break existing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue