Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
d5c83d7c
Commit
d5c83d7c
authored
Feb 15, 2010
by
Niels Möller
Browse files
(make_lshd_port): Check that IPV6_V6ONLY is defined
before trying to setsockopt it. Rev: src/lshd.c:1.189
parent
c6a482ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lshd.c
View file @
d5c83d7c
...
...
@@ -325,7 +325,7 @@ make_lshd_port(struct lshd_context *ctx, socklen_t addr_len, struct sockaddr *ad
if
(
setsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
yes
,
sizeof
(
yes
))
<
0
)
werror
(
"setsockopt SO_REUSEADDR failed: %e.
\n
"
,
errno
);
#if WITH_IPV6
#if WITH_IPV6
&& defined (IPV6_V6ONLY)
if
(
addr
->
sa_family
==
AF_INET6
)
{
if
(
setsockopt
(
fd
,
IPPROTO_IPV6
,
IPV6_V6ONLY
,
&
yes
,
sizeof
(
yes
))
<
0
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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