aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:37:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:37:59 -0400
commit839c5d2511fadc35cc4e8a8ffa833d76668700b2 (patch)
tree8c5150c50dba619ec88818e1610263582d476217
parent96fad28a781069eb40156f78b8f50c349805b652 (diff)
parent5e43db7730e7cef7d37968ea789c41392519a864 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
-rw-r--r--drivers/net/Kconfig38
-rw-r--r--net/core/sock.c13
-rw-r--r--net/core/utils.c37
-rw-r--r--net/ipv4/Kconfig2
-rw-r--r--net/ipv4/Makefile2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_core.c2
-rw-r--r--net/ipv4/utils.c59
7 files changed, 64 insertions, 89 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 534b598866b3..8a835eb58808 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -23,9 +23,12 @@ config NETDEVICES
23 23
24 If unsure, say Y. 24 If unsure, say Y.
25 25
26# All the following symbols are dependent on NETDEVICES - do not repeat
27# that for each of the symbols.
28if NETDEVICES
29
26config DUMMY 30config DUMMY
27 tristate "Dummy net driver support" 31 tristate "Dummy net driver support"
28 depends on NETDEVICES
29 ---help--- 32 ---help---
30 This is essentially a bit-bucket device (i.e. traffic you send to 33 This is essentially a bit-bucket device (i.e. traffic you send to
31 this device is consigned into oblivion) with a configurable IP 34 this device is consigned into oblivion) with a configurable IP
@@ -45,7 +48,6 @@ config DUMMY
45 48
46config BONDING 49config BONDING
47 tristate "Bonding driver support" 50 tristate "Bonding driver support"
48 depends on NETDEVICES
49 depends on INET 51 depends on INET
50 ---help--- 52 ---help---
51 Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet 53 Say 'Y' or 'M' if you wish to be able to 'bond' multiple Ethernet
@@ -63,7 +65,6 @@ config BONDING
63 65
64config EQUALIZER 66config EQUALIZER
65 tristate "EQL (serial line load balancing) support" 67 tristate "EQL (serial line load balancing) support"
66 depends on NETDEVICES
67 ---help--- 68 ---help---
68 If you have two serial connections to some other computer (this 69 If you have two serial connections to some other computer (this
69 usually requires two modems and two telephone lines) and you use 70 usually requires two modems and two telephone lines) and you use
@@ -83,7 +84,6 @@ config EQUALIZER
83 84
84config TUN 85config TUN
85 tristate "Universal TUN/TAP device driver support" 86 tristate "Universal TUN/TAP device driver support"
86 depends on NETDEVICES
87 select CRC32 87 select CRC32
88 ---help--- 88 ---help---
89 TUN/TAP provides packet reception and transmission for user space 89 TUN/TAP provides packet reception and transmission for user space
@@ -107,7 +107,7 @@ config TUN
107 107
108config NET_SB1000 108config NET_SB1000
109 tristate "General Instruments Surfboard 1000" 109 tristate "General Instruments Surfboard 1000"
110 depends on NETDEVICES && PNP 110 depends on PNP
111 ---help--- 111 ---help---
112 This is a driver for the General Instrument (also known as 112 This is a driver for the General Instrument (also known as
113 NextLevel) SURFboard 1000 internal 113 NextLevel) SURFboard 1000 internal
@@ -129,16 +129,14 @@ config NET_SB1000
129 129
130 If you don't have this card, of course say N. 130 If you don't have this card, of course say N.
131 131
132if NETDEVICES
133 source "drivers/net/arcnet/Kconfig" 132 source "drivers/net/arcnet/Kconfig"
134endif
135 133
136# 134#
137# Ethernet 135# Ethernet
138# 136#
139 137
140menu "Ethernet (10 or 100Mbit)" 138menu "Ethernet (10 or 100Mbit)"
141 depends on NETDEVICES && !UML 139 depends on !UML
142 140
143config NET_ETHERNET 141config NET_ETHERNET
144 bool "Ethernet (10 or 100Mbit)" 142 bool "Ethernet (10 or 100Mbit)"
@@ -1137,7 +1135,7 @@ config IBMLANA
1137 1135
1138config IBMVETH 1136config IBMVETH
1139 tristate "IBM LAN Virtual Ethernet support" 1137 tristate "IBM LAN Virtual Ethernet support"
1140 depends on NETDEVICES && NET_ETHERNET && PPC_PSERIES 1138 depends on NET_ETHERNET && PPC_PSERIES
1141 ---help--- 1139 ---help---
1142 This driver supports virtual ethernet adapters on newer IBM iSeries 1140 This driver supports virtual ethernet adapters on newer IBM iSeries
1143 and pSeries systems. 1141 and pSeries systems.
@@ -1760,7 +1758,7 @@ endmenu
1760# 1758#
1761 1759
1762menu "Ethernet (1000 Mbit)" 1760menu "Ethernet (1000 Mbit)"
1763 depends on NETDEVICES && !UML 1761 depends on !UML
1764 1762
1765config ACENIC 1763config ACENIC
1766 tristate "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support" 1764 tristate "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support"
@@ -2091,7 +2089,7 @@ endmenu
2091# 2089#
2092 2090
2093menu "Ethernet (10000 Mbit)" 2091menu "Ethernet (10000 Mbit)"
2094 depends on NETDEVICES && !UML 2092 depends on !UML
2095 2093
2096config IXGB 2094config IXGB
2097 tristate "Intel(R) PRO/10GbE support" 2095 tristate "Intel(R) PRO/10GbE support"
@@ -2186,11 +2184,11 @@ source "drivers/s390/net/Kconfig"
2186 2184
2187config ISERIES_VETH 2185config ISERIES_VETH
2188 tristate "iSeries Virtual Ethernet driver support" 2186 tristate "iSeries Virtual Ethernet driver support"
2189 depends on NETDEVICES && PPC_ISERIES 2187 depends on PPC_ISERIES
2190 2188
2191config FDDI 2189config FDDI
2192 bool "FDDI driver support" 2190 bool "FDDI driver support"
2193 depends on NETDEVICES && (PCI || EISA) 2191 depends on (PCI || EISA)
2194 help 2192 help
2195 Fiber Distributed Data Interface is a high speed local area network 2193 Fiber Distributed Data Interface is a high speed local area network
2196 design; essentially a replacement for high speed Ethernet. FDDI can 2194 design; essentially a replacement for high speed Ethernet. FDDI can
@@ -2239,7 +2237,7 @@ config SKFP
2239 2237
2240config HIPPI 2238config HIPPI
2241 bool "HIPPI driver support (EXPERIMENTAL)" 2239 bool "HIPPI driver support (EXPERIMENTAL)"
2242 depends on NETDEVICES && EXPERIMENTAL && INET && PCI 2240 depends on EXPERIMENTAL && INET && PCI
2243 help 2241 help
2244 HIgh Performance Parallel Interface (HIPPI) is a 800Mbit/sec and 2242 HIgh Performance Parallel Interface (HIPPI) is a 800Mbit/sec and
2245 1600Mbit/sec dual-simplex switched or point-to-point network. HIPPI 2243 1600Mbit/sec dual-simplex switched or point-to-point network. HIPPI
@@ -2271,7 +2269,7 @@ config ROADRUNNER_LARGE_RINGS
2271 2269
2272config PLIP 2270config PLIP
2273 tristate "PLIP (parallel port) support" 2271 tristate "PLIP (parallel port) support"
2274 depends on NETDEVICES && PARPORT 2272 depends on PARPORT
2275 ---help--- 2273 ---help---
2276 PLIP (Parallel Line Internet Protocol) is used to create a 2274 PLIP (Parallel Line Internet Protocol) is used to create a
2277 reasonably fast mini network consisting of two (or, rarely, more) 2275 reasonably fast mini network consisting of two (or, rarely, more)
@@ -2307,7 +2305,6 @@ config PLIP
2307 2305
2308config PPP 2306config PPP
2309 tristate "PPP (point-to-point protocol) support" 2307 tristate "PPP (point-to-point protocol) support"
2310 depends on NETDEVICES
2311 ---help--- 2308 ---help---
2312 PPP (Point to Point Protocol) is a newer and better SLIP. It serves 2309 PPP (Point to Point Protocol) is a newer and better SLIP. It serves
2313 the same purpose: sending Internet traffic over telephone (and other 2310 the same purpose: sending Internet traffic over telephone (and other
@@ -2443,7 +2440,6 @@ config PPPOATM
2443 2440
2444config SLIP 2441config SLIP
2445 tristate "SLIP (serial line) support" 2442 tristate "SLIP (serial line) support"
2446 depends on NETDEVICES
2447 ---help--- 2443 ---help---
2448 Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to 2444 Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
2449 connect to your Internet service provider or to connect to some 2445 connect to your Internet service provider or to connect to some
@@ -2510,7 +2506,7 @@ config SLIP_MODE_SLIP6
2510 2506
2511config NET_FC 2507config NET_FC
2512 bool "Fibre Channel driver support" 2508 bool "Fibre Channel driver support"
2513 depends on NETDEVICES && SCSI && PCI 2509 depends on SCSI && PCI
2514 help 2510 help
2515 Fibre Channel is a high speed serial protocol mainly used to connect 2511 Fibre Channel is a high speed serial protocol mainly used to connect
2516 large storage devices to the computer; it is compatible with and 2512 large storage devices to the computer; it is compatible with and
@@ -2523,7 +2519,7 @@ config NET_FC
2523 2519
2524config SHAPER 2520config SHAPER
2525 tristate "Traffic Shaper (EXPERIMENTAL)" 2521 tristate "Traffic Shaper (EXPERIMENTAL)"
2526 depends on NETDEVICES && EXPERIMENTAL 2522 depends on EXPERIMENTAL
2527 ---help--- 2523 ---help---
2528 The traffic shaper is a virtual network device that allows you to 2524 The traffic shaper is a virtual network device that allows you to
2529 limit the rate of outgoing data flow over some other network device. 2525 limit the rate of outgoing data flow over some other network device.
@@ -2544,11 +2540,13 @@ config SHAPER
2544 2540
2545config NETCONSOLE 2541config NETCONSOLE
2546 tristate "Network console logging support (EXPERIMENTAL)" 2542 tristate "Network console logging support (EXPERIMENTAL)"
2547 depends on NETDEVICES && INET && EXPERIMENTAL 2543 depends on EXPERIMENTAL
2548 ---help--- 2544 ---help---
2549 If you want to log kernel messages over the network, enable this. 2545 If you want to log kernel messages over the network, enable this.
2550 See <file:Documentation/networking/netconsole.txt> for details. 2546 See <file:Documentation/networking/netconsole.txt> for details.
2551 2547
2548endif #NETDEVICES
2549
2552config NETPOLL 2550config NETPOLL
2553 def_bool NETCONSOLE 2551 def_bool NETCONSOLE
2554 2552
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)
153EXPORT_SYMBOL(net_random); 153EXPORT_SYMBOL(net_random);
154EXPORT_SYMBOL(net_ratelimit); 154EXPORT_SYMBOL(net_ratelimit);
155EXPORT_SYMBOL(net_srandom); 155EXPORT_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
190EXPORT_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
125config IP_ROUTE_MULTIPATH_CACHED 125config 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
5obj-y := utils.o route.o inetpeer.o protocol.o \ 5obj-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
59EXPORT_SYMBOL(in_aton);