diff options
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
-rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 15061b314411..2e770f45d829 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c | |||
@@ -129,6 +129,23 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, | |||
129 | return ret; | 129 | return ret; |
130 | } | 130 | } |
131 | 131 | ||
132 | static int proc_tcp_available_congestion_control(ctl_table *ctl, | ||
133 | int write, struct file * filp, | ||
134 | void __user *buffer, size_t *lenp, | ||
135 | loff_t *ppos) | ||
136 | { | ||
137 | ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX, }; | ||
138 | int ret; | ||
139 | |||
140 | tbl.data = kmalloc(tbl.maxlen, GFP_USER); | ||
141 | if (!tbl.data) | ||
142 | return -ENOMEM; | ||
143 | tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX); | ||
144 | ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos); | ||
145 | kfree(tbl.data); | ||
146 | return ret; | ||
147 | } | ||
148 | |||
132 | ctl_table ipv4_table[] = { | 149 | ctl_table ipv4_table[] = { |
133 | { | 150 | { |
134 | .ctl_name = NET_IPV4_TCP_TIMESTAMPS, | 151 | .ctl_name = NET_IPV4_TCP_TIMESTAMPS, |
@@ -731,6 +748,13 @@ ctl_table ipv4_table[] = { | |||
731 | .proc_handler = &proc_dointvec, | 748 | .proc_handler = &proc_dointvec, |
732 | }, | 749 | }, |
733 | #endif /* CONFIG_NETLABEL */ | 750 | #endif /* CONFIG_NETLABEL */ |
751 | { | ||
752 | .ctl_name = NET_TCP_AVAIL_CONG_CONTROL, | ||
753 | .procname = "tcp_available_congestion_control", | ||
754 | .maxlen = TCP_CA_BUF_MAX, | ||
755 | .mode = 0444, | ||
756 | .proc_handler = &proc_tcp_available_congestion_control, | ||
757 | }, | ||
734 | { .ctl_name = 0 } | 758 | { .ctl_name = 0 } |
735 | }; | 759 | }; |
736 | 760 | ||