Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
76db959b
Commit
76db959b
authored
Dec 15, 2015
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase size of netlink socket buffer.
This appears to get rid with ENOBUFS on recvmsg. Kill me if I know why.
parent
480c78c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
kernel_netlink.c
kernel_netlink.c
+15
-0
No files found.
kernel_netlink.c
View file @
76db959b
...
...
@@ -232,6 +232,7 @@ static int
netlink_socket
(
struct
netlink
*
nl
,
uint32_t
groups
)
{
int
rc
;
int
rcvsize
=
512
*
1024
;
nl
->
sock
=
socket
(
PF_NETLINK
,
SOCK_RAW
,
NETLINK_ROUTE
);
if
(
nl
->
sock
<
0
)
...
...
@@ -252,6 +253,20 @@ netlink_socket(struct netlink *nl, uint32_t groups)
if
(
rc
<
0
)
goto
fail
;
#ifdef SO_RCVBUFFORCE
rc
=
setsockopt
(
nl
->
sock
,
SOL_SOCKET
,
SO_RCVBUFFORCE
,
&
rcvsize
,
sizeof
(
rcvsize
));
#else
rc
=
-
1
;
#endif
if
(
rc
<
0
)
{
rc
=
setsockopt
(
nl
->
sock
,
SOL_SOCKET
,
SO_RCVBUF
,
&
rcvsize
,
sizeof
(
rcvsize
));
if
(
rc
<
0
)
{
perror
(
"setsockopt(SO_RCVBUF)"
);
}
}
rc
=
bind
(
nl
->
sock
,
(
struct
sockaddr
*
)
&
nl
->
sockaddr
,
nl
->
socklen
);
if
(
rc
<
0
)
goto
fail
;
...
...
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