Commit a94cb519 authored by Harald Welte's avatar Harald Welte Committed by David S. Miller

[NETFILTER]: Use new module_param() api

This patch makes all of ipv4/ipv6 netfilter use the 'new' module_param
API.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent a6e13e00
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/netfilter.h> #include <linux/netfilter.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/moduleparam.h>
#include <net/checksum.h> #include <net/checksum.h>
#include <net/udp.h> #include <net/udp.h>
...@@ -34,7 +35,7 @@ static unsigned int master_timeout = 300; ...@@ -34,7 +35,7 @@ static unsigned int master_timeout = 300;
MODULE_AUTHOR("Brian J. Murrell <netfilter@interlinx.bc.ca>"); MODULE_AUTHOR("Brian J. Murrell <netfilter@interlinx.bc.ca>");
MODULE_DESCRIPTION("Amanda connection tracking module"); MODULE_DESCRIPTION("Amanda connection tracking module");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM(master_timeout, "i"); module_param(master_timeout, int, 0600);
MODULE_PARM_DESC(master_timeout, "timeout for the master connection"); MODULE_PARM_DESC(master_timeout, "timeout for the master connection");
static char *conns[] = { "DATA ", "MESG ", "INDEX " }; static char *conns[] = { "DATA ", "MESG ", "INDEX " };
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/jhash.h> #include <linux/jhash.h>
/* For ERR_PTR(). Yeah, I know... --RR */ #include <linux/err.h>
#include <linux/fs.h> #include <linux/moduleparam.h>
/* This rwlock protects the main hash table, protocol/helper/expected /* This rwlock protects the main hash table, protocol/helper/expected
registrations, conntrack timers*/ registrations, conntrack timers*/
...@@ -1373,7 +1373,7 @@ void ip_conntrack_cleanup(void) ...@@ -1373,7 +1373,7 @@ void ip_conntrack_cleanup(void)
} }
static int hashsize; static int hashsize;
MODULE_PARM(hashsize, "i"); module_param(hashsize, int, 0400);
int __init ip_conntrack_init(void) int __init ip_conntrack_init(void)
{ {
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/netfilter_ipv4/lockhelp.h> #include <linux/netfilter_ipv4/lockhelp.h>
#include <linux/netfilter_ipv4/ip_conntrack_helper.h> #include <linux/netfilter_ipv4/ip_conntrack_helper.h>
#include <linux/netfilter_ipv4/ip_conntrack_ftp.h> #include <linux/netfilter_ipv4/ip_conntrack_ftp.h>
#include <linux/moduleparam.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Rusty Russell <rusty@rustcorp.com.au>"); MODULE_AUTHOR("Rusty Russell <rusty@rustcorp.com.au>");
...@@ -33,10 +34,10 @@ struct module *ip_conntrack_ftp = THIS_MODULE; ...@@ -33,10 +34,10 @@ struct module *ip_conntrack_ftp = THIS_MODULE;
#define MAX_PORTS 8 #define MAX_PORTS 8
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
static int ports_c; static int ports_c;
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); module_param_array(ports, int, ports_c, 0400);
static int loose; static int loose;
MODULE_PARM(loose, "i"); module_param(loose, int, 0600);
#if 0 #if 0
#define DEBUGP printk #define DEBUGP printk
...@@ -420,10 +421,10 @@ static int __init init(void) ...@@ -420,10 +421,10 @@ static int __init init(void)
int i, ret; int i, ret;
char *tmpname; char *tmpname;
if (ports[0] == 0) if (ports_c == 0)
ports[0] = FTP_PORT; ports[ports_c++] = FTP_PORT;
for (i = 0; (i < MAX_PORTS) && ports[i]; i++) { for (i = 0; i < ports_c; i++) {
ftp[i].tuple.src.u.tcp.port = htons(ports[i]); ftp[i].tuple.src.u.tcp.port = htons(ports[i]);
ftp[i].tuple.dst.protonum = IPPROTO_TCP; ftp[i].tuple.dst.protonum = IPPROTO_TCP;
ftp[i].mask.src.u.tcp.port = 0xFFFF; ftp[i].mask.src.u.tcp.port = 0xFFFF;
...@@ -449,7 +450,6 @@ static int __init init(void) ...@@ -449,7 +450,6 @@ static int __init init(void)
fini(); fini();
return ret; return ret;
} }
ports_c++;
} }
return 0; return 0;
} }
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/netfilter_ipv4/lockhelp.h> #include <linux/netfilter_ipv4/lockhelp.h>
#include <linux/netfilter_ipv4/ip_conntrack_helper.h> #include <linux/netfilter_ipv4/ip_conntrack_helper.h>
#include <linux/netfilter_ipv4/ip_conntrack_irc.h> #include <linux/netfilter_ipv4/ip_conntrack_irc.h>
#include <linux/moduleparam.h>
#define MAX_PORTS 8 #define MAX_PORTS 8
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
...@@ -44,11 +45,11 @@ static char irc_buffer[65536]; ...@@ -44,11 +45,11 @@ static char irc_buffer[65536];
MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
MODULE_DESCRIPTION("IRC (DCC) connection tracking helper"); MODULE_DESCRIPTION("IRC (DCC) connection tracking helper");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); module_param_array(ports, int, ports_c, 0400);
MODULE_PARM_DESC(ports, "port numbers of IRC servers"); MODULE_PARM_DESC(ports, "port numbers of IRC servers");
MODULE_PARM(max_dcc_channels, "i"); module_param(max_dcc_channels, int, 0400);
MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC session"); MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC session");
MODULE_PARM(dcc_timeout, "i"); module_param(dcc_timeout, int, 0400);
MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels"); MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels");
static char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " }; static char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " };
...@@ -252,10 +253,10 @@ static int __init init(void) ...@@ -252,10 +253,10 @@ static int __init init(void)
} }
/* If no port given, default to standard irc port */ /* If no port given, default to standard irc port */
if (ports[0] == 0) if (ports_c == 0)
ports[0] = IRC_PORT; ports[ports_c++] = IRC_PORT;
for (i = 0; (i < MAX_PORTS) && ports[i]; i++) { for (i = 0; i < ports_c; i++) {
hlpr = &irc_helpers[i]; hlpr = &irc_helpers[i];
hlpr->tuple.src.u.tcp.port = htons(ports[i]); hlpr->tuple.src.u.tcp.port = htons(ports[i]);
hlpr->tuple.dst.protonum = IPPROTO_TCP; hlpr->tuple.dst.protonum = IPPROTO_TCP;
...@@ -284,7 +285,6 @@ static int __init init(void) ...@@ -284,7 +285,6 @@ static int __init init(void)
fini(); fini();
return -EBUSY; return -EBUSY;
} }
ports_c++;
} }
return 0; return 0;
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv4/ip_conntrack_helper.h> #include <linux/netfilter_ipv4/ip_conntrack_helper.h>
#include <linux/netfilter_ipv4/ip_conntrack_tftp.h> #include <linux/netfilter_ipv4/ip_conntrack_tftp.h>
#include <linux/moduleparam.h>
MODULE_AUTHOR("Magnus Boden <mb@ozaba.mine.nu>"); MODULE_AUTHOR("Magnus Boden <mb@ozaba.mine.nu>");
MODULE_DESCRIPTION("tftp connection tracking helper"); MODULE_DESCRIPTION("tftp connection tracking helper");
...@@ -27,7 +28,7 @@ MODULE_LICENSE("GPL"); ...@@ -27,7 +28,7 @@ MODULE_LICENSE("GPL");
#define MAX_PORTS 8 #define MAX_PORTS 8
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
static int ports_c; static int ports_c;
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); module_param_array(ports, int, ports_c, 0400);
MODULE_PARM_DESC(ports, "port numbers of tftp servers"); MODULE_PARM_DESC(ports, "port numbers of tftp servers");
#if 0 #if 0
...@@ -104,10 +105,10 @@ static int __init init(void) ...@@ -104,10 +105,10 @@ static int __init init(void)
int i, ret; int i, ret;
char *tmpname; char *tmpname;
if (!ports[0]) if (ports_c == 0)
ports[0]=TFTP_PORT; ports[ports_c++] = TFTP_PORT;
for (i = 0 ; (i < MAX_PORTS) && ports[i] ; i++) { for (i = 0; i < ports_c; i++) {
/* Create helper structure */ /* Create helper structure */
memset(&tftp[i], 0, sizeof(struct ip_conntrack_helper)); memset(&tftp[i], 0, sizeof(struct ip_conntrack_helper));
...@@ -137,7 +138,6 @@ static int __init init(void) ...@@ -137,7 +138,6 @@ static int __init init(void)
fini(); fini();
return(ret); return(ret);
} }
ports_c++;
} }
return(0); return(0);
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/netfilter_ipv4.h> #include <linux/netfilter_ipv4.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/tcp.h> #include <linux/tcp.h>
#include <linux/moduleparam.h>
#include <net/tcp.h> #include <net/tcp.h>
#include <linux/netfilter_ipv4/ip_nat.h> #include <linux/netfilter_ipv4/ip_nat.h>
#include <linux/netfilter_ipv4/ip_nat_helper.h> #include <linux/netfilter_ipv4/ip_nat_helper.h>
...@@ -33,7 +34,7 @@ MODULE_DESCRIPTION("ftp NAT helper"); ...@@ -33,7 +34,7 @@ MODULE_DESCRIPTION("ftp NAT helper");
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
static int ports_c; static int ports_c;
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); module_param_array(ports, int, ports_c, 0400);
DECLARE_LOCK_EXTERN(ip_ftp_lock); DECLARE_LOCK_EXTERN(ip_ftp_lock);
...@@ -313,10 +314,10 @@ static int __init init(void) ...@@ -313,10 +314,10 @@ static int __init init(void)
int i, ret = 0; int i, ret = 0;
char *tmpname; char *tmpname;
if (ports[0] == 0) if (ports_c == 0)
ports[0] = FTP_PORT; ports[ports_c] = FTP_PORT;
for (i = 0; (i < MAX_PORTS) && ports[i]; i++) { for (i = 0; i < ports_c; i++) {
ftp[i].tuple.dst.protonum = IPPROTO_TCP; ftp[i].tuple.dst.protonum = IPPROTO_TCP;
ftp[i].tuple.src.u.tcp.port = htons(ports[i]); ftp[i].tuple.src.u.tcp.port = htons(ports[i]);
ftp[i].mask.dst.protonum = 0xFFFF; ftp[i].mask.dst.protonum = 0xFFFF;
...@@ -343,7 +344,6 @@ static int __init init(void) ...@@ -343,7 +344,6 @@ static int __init init(void)
fini(); fini();
return ret; return ret;
} }
ports_c++;
} }
return ret; return ret;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/netfilter_ipv4/ip_nat_rule.h> #include <linux/netfilter_ipv4/ip_nat_rule.h>
#include <linux/netfilter_ipv4/ip_conntrack_irc.h> #include <linux/netfilter_ipv4/ip_conntrack_irc.h>
#include <linux/netfilter_ipv4/ip_conntrack_helper.h> #include <linux/netfilter_ipv4/ip_conntrack_helper.h>
#include <linux/moduleparam.h>
#if 0 #if 0
#define DEBUGP printk #define DEBUGP printk
...@@ -41,7 +42,7 @@ static int ports_c; ...@@ -41,7 +42,7 @@ static int ports_c;
MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>"); MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
MODULE_DESCRIPTION("IRC (DCC) NAT helper"); MODULE_DESCRIPTION("IRC (DCC) NAT helper");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i"); module_param_array(ports, int, ports_c, 0400);
MODULE_PARM_DESC(ports, "port numbers of IRC servers"); MODULE_PARM_DESC(ports, "port numbers of IRC servers");
/* protects irc part of conntracks */ /* protects irc part of conntracks */
...@@ -235,11 +236,10 @@ static int __init init(void) ...@@ -235,11 +236,10 @@ static int __init init(void)
struct ip_nat_helper *hlpr; struct ip_nat_helper *hlpr;
char *tmpname; char *tmpname;
if (ports[0] == 0) { if (ports_c == 0)
ports[0] = IRC_PORT; ports[ports_c++] = IRC_PORT;
}
for (i = 0; (i < MAX_PORTS) && ports[i] != 0; i++) { for (i = 0; i < ports_c; i++) {
hlpr = &ip_nat_irc_helpers[i]; hlpr = &ip_nat_irc_helpers[i];
hlpr->tuple.dst.protonum = IPPROTO_TCP; hlpr->tuple.dst.protonum = IPPROTO_TCP;
hlpr->tuple.src.u.tcp.port = htons(ports[i]); hlpr->tuple.src.u.tcp.port = htons(ports[i]);
...@@ -269,7 +269,6 @@ static int __init init(void) ...@@ -269,7 +269,6 @@ static int __init init(void)
fini(); fini();
return 1; return 1;
} }
ports_c++;
} }
return ret; return ret;
} }
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/moduleparam.h>
#include <linux/netfilter_ipv4.h> #include <linux/netfilter_ipv4.h>
#include <linux/netfilter_ipv4/ip_nat.h> #include <linux/netfilter_ipv4/ip_nat.h>
#include <linux/netfilter_ipv4/ip_nat_helper.h> #include <linux/netfilter_ipv4/ip_nat_helper.h>
...@@ -1360,4 +1361,4 @@ static void __exit fini(void) ...@@ -1360,4 +1361,4 @@ static void __exit fini(void)
module_init(init); module_init(init);
module_exit(fini); module_exit(fini);
MODULE_PARM(debug, "i"); module_param(debug, bool, 0600);
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/netfilter_ipv4/ip_conntrack_tftp.h> #include <linux/netfilter_ipv4/ip_conntrack_tftp.h>
#include <linux/netfilter_ipv4/ip_nat_helper.h> #include <linux/netfilter_ipv4/ip_nat_helper.h>
#include <linux/netfilter_ipv4/ip_nat_rule.h> #include <linux/netfilter_ipv4/ip_nat_rule.h>
#include <linux/moduleparam.h>
MODULE_AUTHOR("Magnus Boden <mb@ozaba.mine.nu>"); MODULE_AUTHOR("Magnus Boden <mb@ozaba.mine.nu>");
MODULE_DESCRIPTION("tftp NAT helper"); MODULE_DESCRIPTION("tftp NAT helper");
...@@ -41,7 +42,7 @@ MODULE_LICENSE("GPL"); ...@@ -41,7 +42,7 @@ MODULE_LICENSE("GPL");
static int ports[MAX_PORTS]; static int ports[MAX_PORTS];
static int ports_c = 0; static int ports_c = 0;
MODULE_PARM(ports,"1-" __MODULE_STRING(MAX_PORTS) "i"); module_param_array(ports, int, ports_c, 0400);
MODULE_PARM_DESC(ports, "port numbers of tftp servers"); MODULE_PARM_DESC(ports, "port numbers of tftp servers");
#if 0 #if 0
...@@ -162,10 +163,10 @@ static int __init init(void) ...@@ -162,10 +163,10 @@ static int __init init(void)
int i, ret = 0; int i, ret = 0;
char *tmpname; char *tmpname;
if (!ports[0]) if (ports_c == 0)
ports[0] = TFTP_PORT; ports[ports_c++] = TFTP_PORT;
for (i = 0 ; (i < MAX_PORTS) && ports[i] ; i++) { for (i = 0; i < ports_c; i++) {
memset(&tftp[i], 0, sizeof(struct ip_nat_helper)); memset(&tftp[i], 0, sizeof(struct ip_nat_helper));
tftp[i].tuple.dst.protonum = IPPROTO_UDP; tftp[i].tuple.dst.protonum = IPPROTO_UDP;
...@@ -194,7 +195,6 @@ static int __init init(void) ...@@ -194,7 +195,6 @@ static int __init init(void)
fini(); fini();
return ret; return ret;
} }
ports_c++;
} }
return ret; return ret;
} }
......
...@@ -28,7 +28,7 @@ MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); ...@@ -28,7 +28,7 @@ MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
MODULE_DESCRIPTION("iptables syslog logging module"); MODULE_DESCRIPTION("iptables syslog logging module");
static unsigned int nflog = 1; static unsigned int nflog = 1;
MODULE_PARM(nflog, "i"); module_param(nflog, int, 0400);
MODULE_PARM_DESC(nflog, "register as internal netfilter logging module"); MODULE_PARM_DESC(nflog, "register as internal netfilter logging module");
#if 0 #if 0
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
* by that factor. * by that factor.
* *
* flushtimeout: * flushtimeout:
* Specify, after how many clock ticks (intel: 100 per second) the queue * Specify, after how many hundredths of a second the queue should be
* should be flushed even if it is not full yet. * flushed even if it is not full yet.
* *
* ipt_ULOG.c,v 1.22 2002/10/30 09:07:31 laforge Exp * ipt_ULOG.c,v 1.22 2002/10/30 09:07:31 laforge Exp
*/ */
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include <linux/netlink.h> #include <linux/netlink.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/moduleparam.h>
#include <linux/netfilter.h> #include <linux/netfilter.h>
#include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv4/ipt_ULOG.h> #include <linux/netfilter_ipv4/ipt_ULOG.h>
...@@ -74,15 +75,15 @@ MODULE_DESCRIPTION("iptables userspace logging module"); ...@@ -74,15 +75,15 @@ MODULE_DESCRIPTION("iptables userspace logging module");
#define PRINTR(format, args...) do { if (net_ratelimit()) printk(format , ## args); } while (0) #define PRINTR(format, args...) do { if (net_ratelimit()) printk(format , ## args); } while (0)
static unsigned int nlbufsiz = 4096; static unsigned int nlbufsiz = 4096;
MODULE_PARM(nlbufsiz, "i"); module_param(nlbufsiz, uint, 0600); /* FIXME: Check size < 128k --RR */
MODULE_PARM_DESC(nlbufsiz, "netlink buffer size"); MODULE_PARM_DESC(nlbufsiz, "netlink buffer size");
static unsigned int flushtimeout = 10 * HZ; static unsigned int flushtimeout = 10;
MODULE_PARM(flushtimeout, "i"); module_param(flushtimeout, int, 0600);
MODULE_PARM_DESC(flushtimeout, "buffer flush timeout"); MODULE_PARM_DESC(flushtimeout, "buffer flush timeout (hundredths of a second)");
static unsigned int nflog = 1; static unsigned int nflog = 1;
MODULE_PARM(nflog, "i"); module_param(nflog, int, 0400);
MODULE_PARM_DESC(nflog, "register as internal netfilter logging module"); MODULE_PARM_DESC(nflog, "register as internal netfilter logging module");
/* global data structures */ /* global data structures */
...@@ -264,7 +265,7 @@ static void ipt_ulog_packet(unsigned int hooknum, ...@@ -264,7 +265,7 @@ static void ipt_ulog_packet(unsigned int hooknum,
/* if timer isn't already running, start it */ /* if timer isn't already running, start it */
if (!timer_pending(&ub->timer)) { if (!timer_pending(&ub->timer)) {
ub->timer.expires = jiffies + flushtimeout; ub->timer.expires = jiffies + flushtimeout * HZ / 100;
add_timer(&ub->timer); add_timer(&ub->timer);
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/moduleparam.h>
#include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv4/ipt_recent.h> #include <linux/netfilter_ipv4/ipt_recent.h>
...@@ -37,12 +38,12 @@ KERN_INFO RECENT_NAME " " RECENT_VER ": Stephen Frost <sfrost@snowman.net>. htt ...@@ -37,12 +38,12 @@ KERN_INFO RECENT_NAME " " RECENT_VER ": Stephen Frost <sfrost@snowman.net>. htt
MODULE_AUTHOR("Stephen Frost <sfrost@snowman.net>"); MODULE_AUTHOR("Stephen Frost <sfrost@snowman.net>");
MODULE_DESCRIPTION("IP tables recently seen matching module " RECENT_VER); MODULE_DESCRIPTION("IP tables recently seen matching module " RECENT_VER);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_PARM(ip_list_tot,"i"); module_param(ip_list_tot, int, 0400);
MODULE_PARM(ip_pkt_list_tot,"i"); module_param(ip_pkt_list_tot, int, 0400);
MODULE_PARM(ip_list_hash_size,"i"); module_param(ip_list_hash_size, int, 0400);
MODULE_PARM(ip_list_perms,"i"); module_param(ip_list_perms, int, 0400);
#ifdef DEBUG #ifdef DEBUG
MODULE_PARM(debug,"i"); module_param(debug, int, 0600);
MODULE_PARM_DESC(debug,"debugging level, defaults to 1"); MODULE_PARM_DESC(debug,"debugging level, defaults to 1");
#endif #endif
MODULE_PARM_DESC(ip_list_tot,"number of IPs to remember per list"); MODULE_PARM_DESC(ip_list_tot,"number of IPs to remember per list");
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter_ipv4/ip_tables.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -155,7 +156,7 @@ static struct nf_hook_ops ipt_ops[] = { ...@@ -155,7 +156,7 @@ static struct nf_hook_ops ipt_ops[] = {
/* Default to forward because I got too much mail already. */ /* Default to forward because I got too much mail already. */
static int forward = NF_ACCEPT; static int forward = NF_ACCEPT;
MODULE_PARM(forward, "i"); module_param(forward, bool, 0000);
static int __init init(void) static int __init init(void)
{ {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
...@@ -26,7 +27,7 @@ MODULE_DESCRIPTION("IP6 tables LOG target module"); ...@@ -26,7 +27,7 @@ MODULE_DESCRIPTION("IP6 tables LOG target module");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static unsigned int nflog = 1; static unsigned int nflog = 1;
MODULE_PARM(nflog, "i"); module_param(nflog, int, 0400);
MODULE_PARM_DESC(nflog, "register as internal netfilter logging module"); MODULE_PARM_DESC(nflog, "register as internal netfilter logging module");
struct in_device; struct in_device;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/netfilter_ipv6/ip6_tables.h> #include <linux/netfilter_ipv6/ip6_tables.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -156,7 +157,7 @@ static struct nf_hook_ops ip6t_ops[] = { ...@@ -156,7 +157,7 @@ static struct nf_hook_ops ip6t_ops[] = {
/* Default to forward because I got too much mail already. */ /* Default to forward because I got too much mail already. */
static int forward = NF_ACCEPT; static int forward = NF_ACCEPT;
MODULE_PARM(forward, "i"); module_param(forward, bool, 0000);
static int __init init(void) static int __init init(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment