@@ -202,47 +202,6 @@ static struct nf_hook_ops ipv4_conntrack_ops[] __read_mostly = {
202
202
},
203
203
};
204
204
205
- #if defined(CONFIG_SYSCTL ) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT )
206
- static int log_invalid_proto_min = 0 ;
207
- static int log_invalid_proto_max = 255 ;
208
-
209
- static struct ctl_table ip_ct_sysctl_table [] = {
210
- {
211
- .procname = "ip_conntrack_max" ,
212
- .maxlen = sizeof (int ),
213
- .mode = 0644 ,
214
- .proc_handler = proc_dointvec ,
215
- },
216
- {
217
- .procname = "ip_conntrack_count" ,
218
- .maxlen = sizeof (int ),
219
- .mode = 0444 ,
220
- .proc_handler = proc_dointvec ,
221
- },
222
- {
223
- .procname = "ip_conntrack_buckets" ,
224
- .maxlen = sizeof (unsigned int ),
225
- .mode = 0444 ,
226
- .proc_handler = proc_dointvec ,
227
- },
228
- {
229
- .procname = "ip_conntrack_checksum" ,
230
- .maxlen = sizeof (int ),
231
- .mode = 0644 ,
232
- .proc_handler = proc_dointvec ,
233
- },
234
- {
235
- .procname = "ip_conntrack_log_invalid" ,
236
- .maxlen = sizeof (unsigned int ),
237
- .mode = 0644 ,
238
- .proc_handler = proc_dointvec_minmax ,
239
- .extra1 = & log_invalid_proto_min ,
240
- .extra2 = & log_invalid_proto_max ,
241
- },
242
- { }
243
- };
244
- #endif /* CONFIG_SYSCTL && CONFIG_NF_CONNTRACK_PROC_COMPAT */
245
-
246
205
/* Fast function for those who don't want to parse /proc (and I don't
247
206
blame them). */
248
207
/* Reversing the socket's dst/src point of view gives us the reply
@@ -350,20 +309,6 @@ static struct nf_sockopt_ops so_getorigdst = {
350
309
351
310
static int ipv4_init_net (struct net * net )
352
311
{
353
- #if defined(CONFIG_SYSCTL ) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT )
354
- struct nf_ip_net * in = & net -> ct .nf_ct_proto ;
355
- in -> ctl_table = kmemdup (ip_ct_sysctl_table ,
356
- sizeof (ip_ct_sysctl_table ),
357
- GFP_KERNEL );
358
- if (!in -> ctl_table )
359
- return - ENOMEM ;
360
-
361
- in -> ctl_table [0 ].data = & nf_conntrack_max ;
362
- in -> ctl_table [1 ].data = & net -> ct .count ;
363
- in -> ctl_table [2 ].data = & nf_conntrack_htable_size ;
364
- in -> ctl_table [3 ].data = & net -> ct .sysctl_checksum ;
365
- in -> ctl_table [4 ].data = & net -> ct .sysctl_log_invalid ;
366
- #endif
367
312
return 0 ;
368
313
}
369
314
@@ -379,9 +324,6 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
379
324
.nlattr_tuple_size = ipv4_nlattr_tuple_size ,
380
325
.nlattr_to_tuple = ipv4_nlattr_to_tuple ,
381
326
.nla_policy = ipv4_nla_policy ,
382
- #endif
383
- #if defined(CONFIG_SYSCTL ) && defined (CONFIG_NF_CONNTRACK_PROC_COMPAT )
384
- .ctl_table_path = "net/ipv4/netfilter" ,
385
327
#endif
386
328
.init_net = ipv4_init_net ,
387
329
.me = THIS_MODULE ,
@@ -492,16 +434,7 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
492
434
goto cleanup_icmpv4 ;
493
435
}
494
436
495
- #if defined(CONFIG_PROC_FS ) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT )
496
- ret = nf_conntrack_ipv4_compat_init ();
497
- if (ret < 0 )
498
- goto cleanup_proto ;
499
- #endif
500
437
return ret ;
501
- #if defined(CONFIG_PROC_FS ) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT )
502
- cleanup_proto :
503
- nf_ct_l3proto_unregister (& nf_conntrack_l3proto_ipv4 );
504
- #endif
505
438
cleanup_icmpv4 :
506
439
nf_ct_l4proto_unregister (& nf_conntrack_l4proto_icmp );
507
440
cleanup_udp4 :
@@ -520,9 +453,6 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
520
453
static void __exit nf_conntrack_l3proto_ipv4_fini (void )
521
454
{
522
455
synchronize_net ();
523
- #if defined(CONFIG_PROC_FS ) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT )
524
- nf_conntrack_ipv4_compat_fini ();
525
- #endif
526
456
nf_ct_l3proto_unregister (& nf_conntrack_l3proto_ipv4 );
527
457
nf_ct_l4proto_unregister (& nf_conntrack_l4proto_icmp );
528
458
nf_ct_l4proto_unregister (& nf_conntrack_l4proto_udp4 );
0 commit comments