diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:37:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:37:59 -0400 |
commit | 839c5d2511fadc35cc4e8a8ffa833d76668700b2 (patch) | |
tree | 8c5150c50dba619ec88818e1610263582d476217 /net | |
parent | 96fad28a781069eb40156f78b8f50c349805b652 (diff) | |
parent | 5e43db7730e7cef7d37968ea789c41392519a864 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/core/sock.c | 13 | ||||
-rw-r--r-- | net/core/utils.c | 37 | ||||
-rw-r--r-- | net/ipv4/Kconfig | 2 | ||||
-rw-r--r-- | net/ipv4/Makefile | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_core.c | 2 | ||||
-rw-r--r-- | net/ipv4/utils.c | 59 |
6 files changed, 46 insertions, 69 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 8b35ccdc2b3b..12f6d9a2a522 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -206,13 +206,14 @@ int sock_setsockopt(struct socket *sock, int level, int optname, | |||
206 | */ | 206 | */ |
207 | 207 | ||
208 | #ifdef SO_DONTLINGER /* Compatibility item... */ | 208 | #ifdef SO_DONTLINGER /* Compatibility item... */ |
209 | switch (optname) { | 209 | if (optname == SO_DONTLINGER) { |
210 | case SO_DONTLINGER: | 210 | lock_sock(sk); |
211 | sock_reset_flag(sk, SOCK_LINGER); | 211 | sock_reset_flag(sk, SOCK_LINGER); |
212 | return 0; | 212 | release_sock(sk); |
213 | return 0; | ||
213 | } | 214 | } |
214 | #endif | 215 | #endif |
215 | 216 | ||
216 | if(optlen<sizeof(int)) | 217 | if(optlen<sizeof(int)) |
217 | return(-EINVAL); | 218 | return(-EINVAL); |
218 | 219 | ||
diff --git a/net/core/utils.c b/net/core/utils.c index e11a8654f363..88eb8b68e26b 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
@@ -23,10 +23,10 @@ | |||
23 | #include <linux/percpu.h> | 23 | #include <linux/percpu.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | 25 | ||
26 | #include <asm/byteorder.h> | ||
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | 29 | ||
29 | |||
30 | /* | 30 | /* |
31 | This is a maximally equidistributed combined Tausworthe generator | 31 | This is a maximally equidistributed combined Tausworthe generator |
32 | based on code from GNU Scientific Library 1.5 (30 Jun 2004) | 32 | based on code from GNU Scientific Library 1.5 (30 Jun 2004) |
@@ -153,3 +153,38 @@ int net_ratelimit(void) | |||
153 | EXPORT_SYMBOL(net_random); | 153 | EXPORT_SYMBOL(net_random); |
154 | EXPORT_SYMBOL(net_ratelimit); | 154 | EXPORT_SYMBOL(net_ratelimit); |
155 | EXPORT_SYMBOL(net_srandom); | 155 | EXPORT_SYMBOL(net_srandom); |
156 | |||
157 | /* | ||
158 | * Convert an ASCII string to binary IP. | ||
159 | * This is outside of net/ipv4/ because various code that uses IP addresses | ||
160 | * is otherwise not dependent on the TCP/IP stack. | ||
161 | */ | ||
162 | |||
163 | __u32 in_aton(const char *str) | ||
164 | { | ||
165 | unsigned long l; | ||
166 | unsigned int val; | ||
167 | int i; | ||
168 | |||
169 | l = 0; | ||
170 | for (i = 0; i < 4; i++) | ||
171 | { | ||
172 | l <<= 8; | ||
173 | if (*str != '\0') | ||
174 | { | ||
175 | val = 0; | ||
176 | while (*str != '\0' && *str != '.') | ||
177 | { | ||
178 | val *= 10; | ||
179 | val += *str - '0'; | ||
180 | str++; | ||
181 | } | ||
182 | l |= val; | ||
183 | if (*str != '\0') | ||
184 | str++; | ||
185 | } | ||
186 | } | ||
187 | return(htonl(l)); | ||
188 | } | ||
189 | |||
190 | EXPORT_SYMBOL(in_aton); | ||
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index fc561c0ae8e2..0b3d9f1d8069 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig | |||
@@ -124,7 +124,7 @@ config IP_ROUTE_MULTIPATH | |||
124 | 124 | ||
125 | config IP_ROUTE_MULTIPATH_CACHED | 125 | config IP_ROUTE_MULTIPATH_CACHED |
126 | bool "IP: equal cost multipath with caching support (EXPERIMENTAL)" | 126 | bool "IP: equal cost multipath with caching support (EXPERIMENTAL)" |
127 | depends on: IP_ROUTE_MULTIPATH | 127 | depends on IP_ROUTE_MULTIPATH |
128 | help | 128 | help |
129 | Normally, equal cost multipath routing is not supported by the | 129 | Normally, equal cost multipath routing is not supported by the |
130 | routing cache. If you say Y here, alternative routes are cached | 130 | routing cache. If you say Y here, alternative routes are cached |
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile index 5718cdb3a61e..55dc6cca1e7b 100644 --- a/net/ipv4/Makefile +++ b/net/ipv4/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux TCP/IP (INET) layer. | 2 | # Makefile for the Linux TCP/IP (INET) layer. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := utils.o route.o inetpeer.o protocol.o \ | 5 | obj-y := route.o inetpeer.o protocol.o \ |
6 | ip_input.o ip_fragment.o ip_forward.o ip_options.o \ | 6 | ip_input.o ip_fragment.o ip_forward.o ip_options.o \ |
7 | ip_output.o ip_sockglue.o \ | 7 | ip_output.o ip_sockglue.o \ |
8 | tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o \ | 8 | tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o \ |
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index 63bf88264980..86f04e41dd8e 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
@@ -510,7 +510,7 @@ init_conntrack(const struct ip_conntrack_tuple *tuple, | |||
510 | /* Welcome, Mr. Bond. We've been expecting you... */ | 510 | /* Welcome, Mr. Bond. We've been expecting you... */ |
511 | __set_bit(IPS_EXPECTED_BIT, &conntrack->status); | 511 | __set_bit(IPS_EXPECTED_BIT, &conntrack->status); |
512 | conntrack->master = exp->master; | 512 | conntrack->master = exp->master; |
513 | #if CONFIG_IP_NF_CONNTRACK_MARK | 513 | #ifdef CONFIG_IP_NF_CONNTRACK_MARK |
514 | conntrack->mark = exp->master->mark; | 514 | conntrack->mark = exp->master->mark; |
515 | #endif | 515 | #endif |
516 | nf_conntrack_get(&conntrack->master->ct_general); | 516 | nf_conntrack_get(&conntrack->master->ct_general); |
diff --git a/net/ipv4/utils.c b/net/ipv4/utils.c deleted file mode 100644 index 6aecd7a43534..000000000000 --- a/net/ipv4/utils.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * INET An implementation of the TCP/IP protocol suite for the LINUX | ||
3 | * operating system. INET is implemented using the BSD Socket | ||
4 | * interface as the means of communication with the user level. | ||
5 | * | ||
6 | * Various kernel-resident INET utility functions; mainly | ||
7 | * for format conversion and debugging output. | ||
8 | * | ||
9 | * Version: $Id: utils.c,v 1.8 2000/10/03 07:29:01 anton Exp $ | ||
10 | * | ||
11 | * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | ||
12 | * | ||
13 | * Fixes: | ||
14 | * Alan Cox : verify_area check. | ||
15 | * Alan Cox : removed old debugging. | ||
16 | * Andi Kleen : add net_ratelimit() | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or | ||
19 | * modify it under the terms of the GNU General Public License | ||
20 | * as published by the Free Software Foundation; either version | ||
21 | * 2 of the License, or (at your option) any later version. | ||
22 | */ | ||
23 | |||
24 | #include <linux/module.h> | ||
25 | #include <linux/types.h> | ||
26 | #include <asm/byteorder.h> | ||
27 | |||
28 | /* | ||
29 | * Convert an ASCII string to binary IP. | ||
30 | */ | ||
31 | |||
32 | __u32 in_aton(const char *str) | ||
33 | { | ||
34 | unsigned long l; | ||
35 | unsigned int val; | ||
36 | int i; | ||
37 | |||
38 | l = 0; | ||
39 | for (i = 0; i < 4; i++) | ||
40 | { | ||
41 | l <<= 8; | ||
42 | if (*str != '\0') | ||
43 | { | ||
44 | val = 0; | ||
45 | while (*str != '\0' && *str != '.') | ||
46 | { | ||
47 | val *= 10; | ||
48 | val += *str - '0'; | ||
49 | str++; | ||
50 | } | ||
51 | l |= val; | ||
52 | if (*str != '\0') | ||
53 | str++; | ||
54 | } | ||
55 | } | ||
56 | return(htonl(l)); | ||
57 | } | ||
58 | |||
59 | EXPORT_SYMBOL(in_aton); | ||