Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
217e86f8
Commit
217e86f8
authored
Oct 28, 2003
by
Nickolai Zeldovich
Committed by
Arnaldo Carvalho de Melo
Oct 28, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Allow SOMAXCONN to be adjusted via sysctl.
parent
b46f1cf2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
include/linux/sysctl.h
include/linux/sysctl.h
+2
-1
net/core/sysctl_net_core.c
net/core/sysctl_net_core.c
+9
-0
net/socket.c
net/socket.c
+4
-2
No files found.
include/linux/sysctl.h
View file @
217e86f8
...
...
@@ -217,7 +217,8 @@ enum
NET_CORE_NO_CONG
=
14
,
NET_CORE_LO_CONG
=
15
,
NET_CORE_MOD_CONG
=
16
,
NET_CORE_DEV_WEIGHT
=
17
NET_CORE_DEV_WEIGHT
=
17
,
NET_CORE_SOMAXCONN
=
18
,
};
/* /proc/sys/net/ethernet */
...
...
net/core/sysctl_net_core.c
View file @
217e86f8
...
...
@@ -29,6 +29,7 @@ extern __u32 sysctl_rmem_default;
extern
int
sysctl_core_destroy_delay
;
extern
int
sysctl_optmem_max
;
extern
int
sysctl_somaxconn
;
#ifdef CONFIG_NET_DIVERT
extern
char
sysctl_divert_version
[];
...
...
@@ -174,6 +175,14 @@ ctl_table core_table[] = {
},
#endif
/* CONFIG_NET_DIVERT */
#endif
/* CONFIG_NET */
{
.
ctl_name
=
NET_CORE_SOMAXCONN
,
.
procname
=
"somaxconn"
,
.
data
=
&
sysctl_somaxconn
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
},
{
.
ctl_name
=
0
}
};
...
...
net/socket.c
View file @
217e86f8
...
...
@@ -1206,14 +1206,16 @@ asmlinkage long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen)
* ready for listening.
*/
int
sysctl_somaxconn
=
SOMAXCONN
;
asmlinkage
long
sys_listen
(
int
fd
,
int
backlog
)
{
struct
socket
*
sock
;
int
err
;
if
((
sock
=
sockfd_lookup
(
fd
,
&
err
))
!=
NULL
)
{
if
((
unsigned
)
backlog
>
SOMAXCONN
)
backlog
=
SOMAXCONN
;
if
((
unsigned
)
backlog
>
sysctl_somaxconn
)
backlog
=
sysctl_somaxconn
;
err
=
security_socket_listen
(
sock
,
backlog
);
if
(
err
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment