summaryrefslogtreecommitdiffstats
path: root/net/ipv4/sysctl_net_ipv4.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /net/ipv4/sysctl_net_ipv4.c
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
-rw-r--r--net/ipv4/sysctl_net_ipv4.c103
1 files changed, 15 insertions, 88 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 637f2f933..3a8a7efb4 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -1,7 +1,7 @@
/*
* sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
*
- * $Id: sysctl_net_ipv4.c,v 1.5 1997/12/16 05:37:46 ralf Exp $
+ * $Id: sysctl_net_ipv4.c,v 1.6 1998/03/03 01:23:42 ralf Exp $
*
* Begun April 1, 1996, Mike Shaver.
* Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS]
@@ -28,16 +28,6 @@ static int boolean_min = 0;
static int boolean_max = 1;
#endif
-/* From arp.c */
-extern int sysctl_arp_res_time;
-extern int sysctl_arp_dead_res_time;
-extern int sysctl_arp_max_tries;
-extern int sysctl_arp_timeout;
-extern int sysctl_arp_check_interval;
-extern int sysctl_arp_confirm_interval;
-extern int sysctl_arp_confirm_timeout;
-extern int sysctl_arp_max_pings;
-
/* From icmp.c */
extern int sysctl_icmp_echo_ignore_all;
extern int sysctl_icmp_echo_ignore_broadcasts;
@@ -64,7 +54,6 @@ extern int sysctl_tcp_keepalive_probes;
extern int sysctl_tcp_max_ka_probes;
extern int sysctl_tcp_retries1;
extern int sysctl_tcp_retries2;
-extern int sysctl_tcp_max_delay_acks;
extern int sysctl_tcp_fin_timeout;
extern int sysctl_tcp_syncookies;
extern int sysctl_tcp_syn_retries;
@@ -84,60 +73,29 @@ int tcp_retr1_max = 255;
extern int tcp_sysctl_congavoid(ctl_table *ctl, int write, struct file * filp,
void *buffer, size_t *lenp);
-struct ipv4_config ipv4_config = { 1, 1, 1, 0, };
+struct ipv4_config ipv4_config;
-#ifdef CONFIG_SYSCTL
+extern ctl_table ipv4_route_table[];
-struct ipv4_config ipv4_def_router_config = { 0, 1, 1, 1, 1, 1, 1, };
-struct ipv4_config ipv4_def_host_config = { 1, 1, 1, 0, };
+#ifdef CONFIG_SYSCTL
static
-int ipv4_sysctl_forwarding(ctl_table *ctl, int write, struct file * filp,
- void *buffer, size_t *lenp)
+int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
+ void *buffer, size_t *lenp)
{
- int val = IS_ROUTER;
+ int val = ipv4_devconf.forwarding;
int ret;
ret = proc_dointvec(ctl, write, filp, buffer, lenp);
- if (write && IS_ROUTER != val) {
- if (IS_ROUTER)
- ipv4_config = ipv4_def_router_config;
- else
- ipv4_config = ipv4_def_host_config;
- rt_cache_flush(0);
- }
+ if (write && ipv4_devconf.forwarding != val)
+ inet_forward_change();
+
return ret;
}
-static
-int ipv4_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp,
- void *buffer, size_t *lenp)
-{
- if (write)
- rt_cache_flush(0);
- return 0;
-}
ctl_table ipv4_table[] = {
- {NET_IPV4_ARP_RES_TIME, "arp_res_time",
- &sysctl_arp_res_time, sizeof(int), 0644, NULL, &proc_dointvec},
- {NET_IPV4_ARP_DEAD_RES_TIME, "arp_dead_res_time",
- &sysctl_arp_dead_res_time, sizeof(int), 0644, NULL, &proc_dointvec},
- {NET_IPV4_ARP_MAX_TRIES, "arp_max_tries",
- &sysctl_arp_max_tries, sizeof(int), 0644, NULL, &proc_dointvec},
- {NET_IPV4_ARP_MAX_PINGS, "arp_max_pings",
- &sysctl_arp_max_pings, sizeof(int), 0644, NULL, &proc_dointvec},
- {NET_IPV4_ARP_TIMEOUT, "arp_timeout",
- &sysctl_arp_timeout, sizeof(int), 0644, NULL, &proc_dointvec},
- {NET_IPV4_ARP_CHECK_INTERVAL, "arp_check_interval",
- &sysctl_arp_check_interval, sizeof(int), 0644, NULL, &proc_dointvec},
- {NET_IPV4_ARP_CONFIRM_INTERVAL, "arp_confirm_interval",
- &sysctl_arp_confirm_interval, sizeof(int), 0644, NULL,
- &proc_dointvec},
- {NET_IPV4_ARP_CONFIRM_TIMEOUT, "arp_confirm_timeout",
- &sysctl_arp_confirm_timeout, sizeof(int), 0644, NULL,
- &proc_dointvec},
{NET_IPV4_TCP_HOE_RETRANSMITS, "tcp_hoe_retransmits",
&sysctl_tcp_hoe_retransmits, sizeof(int), 0644, NULL,
&proc_dointvec},
@@ -156,55 +114,25 @@ ctl_table ipv4_table[] = {
{NET_IPV4_TCP_VEGAS_CONG_AVOID, "tcp_vegas_cong_avoid",
&sysctl_tcp_cong_avoidance, sizeof(int), 0644,
NULL, &tcp_sysctl_congavoid },
- {NET_IPV4_FORWARDING, "ip_forwarding",
- &ip_statistics.IpForwarding, sizeof(int), 0644, NULL,
- &ipv4_sysctl_forwarding},
+ {NET_IPV4_FORWARD, "ip_forward",
+ &ipv4_devconf.forwarding, sizeof(int), 0644, NULL,
+ &ipv4_sysctl_forward},
{NET_IPV4_DEFAULT_TTL, "ip_default_ttl",
&ip_statistics.IpDefaultTTL, sizeof(int), 0644, NULL,
&proc_dointvec},
- {NET_IPV4_RFC1812_FILTER, "ip_rfc1812_filter",
- &ipv4_config.rfc1812_filter, sizeof(int), 0644, NULL,
- &proc_dointvec},
- {NET_IPV4_LOG_MARTIANS, "ip_log_martians",
- &ipv4_config.log_martians, sizeof(int), 0644, NULL,
- &proc_dointvec},
- {NET_IPV4_SOURCE_ROUTE, "ip_source_route",
- &ipv4_config.source_route, sizeof(int), 0644, NULL,
- &proc_dointvec},
- {NET_IPV4_SEND_REDIRECTS, "ip_send_redirects",
- &ipv4_config.send_redirects, sizeof(int), 0644, NULL,
- &proc_dointvec},
{NET_IPV4_AUTOCONFIG, "ip_autoconfig",
&ipv4_config.autoconfig, sizeof(int), 0644, NULL,
&proc_dointvec},
- {NET_IPV4_BOOTP_RELAY, "ip_bootp_relay",
- &ipv4_config.bootp_relay, sizeof(int), 0644, NULL,
- &proc_dointvec},
- {NET_IPV4_PROXY_ARP, "ip_proxy_arp",
- &ipv4_config.proxy_arp, sizeof(int), 0644, NULL,
- &proc_dointvec},
{NET_IPV4_NO_PMTU_DISC, "ip_no_pmtu_disc",
&ipv4_config.no_pmtu_disc, sizeof(int), 0644, NULL,
&proc_dointvec},
- {NET_IPV4_ACCEPT_REDIRECTS, "ip_accept_redirects",
- &ipv4_config.accept_redirects, sizeof(int), 0644, NULL,
- &proc_dointvec},
- {NET_IPV4_SECURE_REDIRECTS, "ip_secure_redirects",
- &ipv4_config.secure_redirects, sizeof(int), 0644, NULL,
- &proc_dointvec},
- {NET_IPV4_RFC1620_REDIRECTS, "ip_rfc1620_redirects",
- &ipv4_config.rfc1620_redirects, sizeof(int), 0644, NULL,
- &proc_dointvec},
- {NET_IPV4_RTCACHE_FLUSH, "ip_rtcache_flush",
- NULL, sizeof(int), 0644, NULL,
- &ipv4_sysctl_rtcache_flush},
{NET_IPV4_TCP_SYN_RETRIES, "tcp_syn_retries",
&sysctl_tcp_syn_retries, sizeof(int), 0644, NULL, &proc_dointvec},
{NET_IPV4_IPFRAG_HIGH_THRESH, "ipfrag_high_thresh",
&sysctl_ipfrag_high_thresh, sizeof(int), 0644, NULL, &proc_dointvec},
{NET_IPV4_IPFRAG_LOW_THRESH, "ipfrag_low_thresh",
&sysctl_ipfrag_low_thresh, sizeof(int), 0644, NULL, &proc_dointvec},
- {NET_IPV4_IP_DYNADDR, "ip_dynaddr",
+ {NET_IPV4_DYNADDR, "ip_dynaddr",
&sysctl_ip_dynaddr, sizeof(int), 0644, NULL, &proc_dointvec},
#ifdef CONFIG_IP_MASQUERADE
{NET_IPV4_IP_MASQ_DEBUG, "ip_masq_debug",
@@ -225,8 +153,6 @@ ctl_table ipv4_table[] = {
&sysctl_intvec, NULL, NULL, &tcp_retr1_max},
{NET_IPV4_TCP_RETRIES2, "tcp_retries2",
&sysctl_tcp_retries2, sizeof(int), 0644, NULL, &proc_dointvec},
- {NET_IPV4_TCP_MAX_DELAY_ACKS, "tcp_max_delay_acks",
- &sysctl_tcp_max_delay_acks, sizeof(int), 0644, NULL, &proc_dointvec},
{NET_IPV4_TCP_FIN_TIMEOUT, "tcp_fin_timeout",
&sysctl_tcp_fin_timeout, sizeof(int), 0644, NULL,
&proc_dointvec_jiffies},
@@ -259,6 +185,7 @@ ctl_table ipv4_table[] = {
&sysctl_icmp_paramprob_time, sizeof(int), 0644, NULL, &proc_dointvec},
{NET_IPV4_ICMP_ECHOREPLY_RATE, "icmp_echoreply_rate",
&sysctl_icmp_echoreply_time, sizeof(int), 0644, NULL, &proc_dointvec},
+ {NET_IPV4_ROUTE, "route", NULL, 0, 0555, ipv4_route_table},
{0}
};