aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-09-24 18:13:11 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-24 18:13:11 -0400
commit8b3f6af86378d0a10ca2f1ded1da124aef13b62c (patch)
treede6ca90295730343c495be8d98be8efa322140ef /net/ipv4
parent139d6065c83071d5f66cd013a274a43699f8e2c1 (diff)
parent94e0fb086fc5663c38bbc0fe86d698be8314f82f (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: drivers/staging/Kconfig drivers/staging/Makefile drivers/staging/cpc-usb/TODO drivers/staging/cpc-usb/cpc-usb_drv.c drivers/staging/cpc-usb/cpc.h drivers/staging/cpc-usb/cpc_int.h drivers/staging/cpc-usb/cpcusb.h
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/devinet.c12
-rw-r--r--net/ipv4/route.c9
-rw-r--r--net/ipv4/syncookies.c5
-rw-r--r--net/ipv4/sysctl_net_ipv4.c16
-rw-r--r--net/ipv4/tcp.c4
5 files changed, 23 insertions, 23 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 07336c6201f0..e92f1fd28aa5 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1270,10 +1270,10 @@ static void inet_forward_change(struct net *net)
1270} 1270}
1271 1271
1272static int devinet_conf_proc(ctl_table *ctl, int write, 1272static int devinet_conf_proc(ctl_table *ctl, int write,
1273 struct file *filp, void __user *buffer, 1273 void __user *buffer,
1274 size_t *lenp, loff_t *ppos) 1274 size_t *lenp, loff_t *ppos)
1275{ 1275{
1276 int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); 1276 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
1277 1277
1278 if (write) { 1278 if (write) {
1279 struct ipv4_devconf *cnf = ctl->extra1; 1279 struct ipv4_devconf *cnf = ctl->extra1;
@@ -1342,12 +1342,12 @@ static int devinet_conf_sysctl(ctl_table *table,
1342} 1342}
1343 1343
1344static int devinet_sysctl_forward(ctl_table *ctl, int write, 1344static int devinet_sysctl_forward(ctl_table *ctl, int write,
1345 struct file *filp, void __user *buffer, 1345 void __user *buffer,
1346 size_t *lenp, loff_t *ppos) 1346 size_t *lenp, loff_t *ppos)
1347{ 1347{
1348 int *valp = ctl->data; 1348 int *valp = ctl->data;
1349 int val = *valp; 1349 int val = *valp;
1350 int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); 1350 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
1351 1351
1352 if (write && *valp != val) { 1352 if (write && *valp != val) {
1353 struct net *net = ctl->extra2; 1353 struct net *net = ctl->extra2;
@@ -1372,12 +1372,12 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
1372} 1372}
1373 1373
1374int ipv4_doint_and_flush(ctl_table *ctl, int write, 1374int ipv4_doint_and_flush(ctl_table *ctl, int write,
1375 struct file *filp, void __user *buffer, 1375 void __user *buffer,
1376 size_t *lenp, loff_t *ppos) 1376 size_t *lenp, loff_t *ppos)
1377{ 1377{
1378 int *valp = ctl->data; 1378 int *valp = ctl->data;
1379 int val = *valp; 1379 int val = *valp;
1380 int ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos); 1380 int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
1381 struct net *net = ctl->extra2; 1381 struct net *net = ctl->extra2;
1382 1382
1383 if (write && *valp != val) 1383 if (write && *valp != val)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 91867d3e6328..bb4199252026 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3036,7 +3036,7 @@ void ip_rt_multicast_event(struct in_device *in_dev)
3036 3036
3037#ifdef CONFIG_SYSCTL 3037#ifdef CONFIG_SYSCTL
3038static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, 3038static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write,
3039 struct file *filp, void __user *buffer, 3039 void __user *buffer,
3040 size_t *lenp, loff_t *ppos) 3040 size_t *lenp, loff_t *ppos)
3041{ 3041{
3042 if (write) { 3042 if (write) {
@@ -3046,7 +3046,7 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write,
3046 3046
3047 memcpy(&ctl, __ctl, sizeof(ctl)); 3047 memcpy(&ctl, __ctl, sizeof(ctl));
3048 ctl.data = &flush_delay; 3048 ctl.data = &flush_delay;
3049 proc_dointvec(&ctl, write, filp, buffer, lenp, ppos); 3049 proc_dointvec(&ctl, write, buffer, lenp, ppos);
3050 3050
3051 net = (struct net *)__ctl->extra1; 3051 net = (struct net *)__ctl->extra1;
3052 rt_cache_flush(net, flush_delay); 3052 rt_cache_flush(net, flush_delay);
@@ -3106,12 +3106,11 @@ static void rt_secret_reschedule(int old)
3106} 3106}
3107 3107
3108static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, 3108static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write,
3109 struct file *filp,
3110 void __user *buffer, size_t *lenp, 3109 void __user *buffer, size_t *lenp,
3111 loff_t *ppos) 3110 loff_t *ppos)
3112{ 3111{
3113 int old = ip_rt_secret_interval; 3112 int old = ip_rt_secret_interval;
3114 int ret = proc_dointvec_jiffies(ctl, write, filp, buffer, lenp, ppos); 3113 int ret = proc_dointvec_jiffies(ctl, write, buffer, lenp, ppos);
3115 3114
3116 rt_secret_reschedule(old); 3115 rt_secret_reschedule(old);
3117 3116
@@ -3414,7 +3413,7 @@ int __init ip_rt_init(void)
3414 alloc_large_system_hash("IP route cache", 3413 alloc_large_system_hash("IP route cache",
3415 sizeof(struct rt_hash_bucket), 3414 sizeof(struct rt_hash_bucket),
3416 rhash_entries, 3415 rhash_entries,
3417 (num_physpages >= 128 * 1024) ? 3416 (totalram_pages >= 128 * 1024) ?
3418 15 : 17, 3417 15 : 17,
3419 0, 3418 0,
3420 &rt_hash_log, 3419 &rt_hash_log,
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index cd2b97f1b6e1..a6e0e077ac33 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -37,12 +37,13 @@ __initcall(init_syncookies);
37#define COOKIEBITS 24 /* Upper bits store count */ 37#define COOKIEBITS 24 /* Upper bits store count */
38#define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) 38#define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
39 39
40static DEFINE_PER_CPU(__u32, cookie_scratch)[16 + 5 + SHA_WORKSPACE_WORDS]; 40static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS],
41 ipv4_cookie_scratch);
41 42
42static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, 43static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport,
43 u32 count, int c) 44 u32 count, int c)
44{ 45{
45 __u32 *tmp = __get_cpu_var(cookie_scratch); 46 __u32 *tmp = __get_cpu_var(ipv4_cookie_scratch);
46 47
47 memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c])); 48 memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c]));
48 tmp[0] = (__force u32)saddr; 49 tmp[0] = (__force u32)saddr;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 4710d219f06a..2dcf04d9b005 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -36,7 +36,7 @@ static void set_local_port_range(int range[2])
36} 36}
37 37
38/* Validate changes from /proc interface. */ 38/* Validate changes from /proc interface. */
39static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp, 39static int ipv4_local_port_range(ctl_table *table, int write,
40 void __user *buffer, 40 void __user *buffer,
41 size_t *lenp, loff_t *ppos) 41 size_t *lenp, loff_t *ppos)
42{ 42{
@@ -51,7 +51,7 @@ static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp,
51 }; 51 };
52 52
53 inet_get_local_port_range(range, range + 1); 53 inet_get_local_port_range(range, range + 1);
54 ret = proc_dointvec_minmax(&tmp, write, filp, buffer, lenp, ppos); 54 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos);
55 55
56 if (write && ret == 0) { 56 if (write && ret == 0) {
57 if (range[1] < range[0]) 57 if (range[1] < range[0])
@@ -91,7 +91,7 @@ static int ipv4_sysctl_local_port_range(ctl_table *table,
91} 91}
92 92
93 93
94static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * filp, 94static int proc_tcp_congestion_control(ctl_table *ctl, int write,
95 void __user *buffer, size_t *lenp, loff_t *ppos) 95 void __user *buffer, size_t *lenp, loff_t *ppos)
96{ 96{
97 char val[TCP_CA_NAME_MAX]; 97 char val[TCP_CA_NAME_MAX];
@@ -103,7 +103,7 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file *
103 103
104 tcp_get_default_congestion_control(val); 104 tcp_get_default_congestion_control(val);
105 105
106 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); 106 ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
107 if (write && ret == 0) 107 if (write && ret == 0)
108 ret = tcp_set_default_congestion_control(val); 108 ret = tcp_set_default_congestion_control(val);
109 return ret; 109 return ret;
@@ -129,7 +129,7 @@ static int sysctl_tcp_congestion_control(ctl_table *table,
129} 129}
130 130
131static int proc_tcp_available_congestion_control(ctl_table *ctl, 131static int proc_tcp_available_congestion_control(ctl_table *ctl,
132 int write, struct file * filp, 132 int write,
133 void __user *buffer, size_t *lenp, 133 void __user *buffer, size_t *lenp,
134 loff_t *ppos) 134 loff_t *ppos)
135{ 135{
@@ -140,13 +140,13 @@ static int proc_tcp_available_congestion_control(ctl_table *ctl,
140 if (!tbl.data) 140 if (!tbl.data)
141 return -ENOMEM; 141 return -ENOMEM;
142 tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX); 142 tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX);
143 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); 143 ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
144 kfree(tbl.data); 144 kfree(tbl.data);
145 return ret; 145 return ret;
146} 146}
147 147
148static int proc_allowed_congestion_control(ctl_table *ctl, 148static int proc_allowed_congestion_control(ctl_table *ctl,
149 int write, struct file * filp, 149 int write,
150 void __user *buffer, size_t *lenp, 150 void __user *buffer, size_t *lenp,
151 loff_t *ppos) 151 loff_t *ppos)
152{ 152{
@@ -158,7 +158,7 @@ static int proc_allowed_congestion_control(ctl_table *ctl,
158 return -ENOMEM; 158 return -ENOMEM;
159 159
160 tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen); 160 tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen);
161 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); 161 ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
162 if (write && ret == 0) 162 if (write && ret == 0)
163 ret = tcp_set_allowed_congestion_control(tbl.data); 163 ret = tcp_set_allowed_congestion_control(tbl.data);
164 kfree(tbl.data); 164 kfree(tbl.data);
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 19a0612b8a20..21387ebabf00 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2862,7 +2862,7 @@ void __init tcp_init(void)
2862 alloc_large_system_hash("TCP established", 2862 alloc_large_system_hash("TCP established",
2863 sizeof(struct inet_ehash_bucket), 2863 sizeof(struct inet_ehash_bucket),
2864 thash_entries, 2864 thash_entries,
2865 (num_physpages >= 128 * 1024) ? 2865 (totalram_pages >= 128 * 1024) ?
2866 13 : 15, 2866 13 : 15,
2867 0, 2867 0,
2868 &tcp_hashinfo.ehash_size, 2868 &tcp_hashinfo.ehash_size,
@@ -2879,7 +2879,7 @@ void __init tcp_init(void)
2879 alloc_large_system_hash("TCP bind", 2879 alloc_large_system_hash("TCP bind",
2880 sizeof(struct inet_bind_hashbucket), 2880 sizeof(struct inet_bind_hashbucket),
2881 tcp_hashinfo.ehash_size, 2881 tcp_hashinfo.ehash_size,
2882 (num_physpages >= 128 * 1024) ? 2882 (totalram_pages >= 128 * 1024) ?
2883 13 : 15, 2883 13 : 15,
2884 0, 2884 0,
2885 &tcp_hashinfo.bhash_size, 2885 &tcp_hashinfo.bhash_size,