[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:

committed by
David S. Miller

parent
d5228a4f49
commit
89cee8b1cb
@@ -22,6 +22,7 @@
|
||||
extern int sysctl_ip_nonlocal_bind;
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
static int zero;
|
||||
static int tcp_retr1_max = 255;
|
||||
static int ip_local_port_range_min[] = { 1, 1 };
|
||||
static int ip_local_port_range_max[] = { 65535, 65535 };
|
||||
@@ -613,6 +614,15 @@ ctl_table ipv4_table[] = {
|
||||
.proc_handler = &proc_dointvec_jiffies,
|
||||
.strategy = &sysctl_jiffies
|
||||
},
|
||||
{
|
||||
.ctl_name = NET_IPV4_IPFRAG_MAX_DIST,
|
||||
.procname = "ipfrag_max_dist",
|
||||
.data = &sysctl_ipfrag_max_dist,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec_minmax,
|
||||
.extra1 = &zero
|
||||
},
|
||||
{
|
||||
.ctl_name = NET_TCP_NO_METRICS_SAVE,
|
||||
.procname = "tcp_no_metrics_save",
|
||||
|
Reference in New Issue
Block a user