Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
fb5e2b8c
Commit
fb5e2b8c
authored
Mar 05, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setting off IPV6_V6ONLY for USE_IPV6 case
parent
4505b007
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
mongoose.c
mongoose.c
+7
-0
No files found.
mongoose.c
View file @
fb5e2b8c
...
...
@@ -4474,6 +4474,9 @@ static int parse_port_string(const struct vec *vec, struct socket *so) {
static
int
set_ports_option
(
struct
mg_context
*
ctx
)
{
const
char
*
list
=
ctx
->
config
[
LISTENING_PORTS
];
int
on
=
1
,
success
=
1
;
#if defined(USE_IPV6)
int
off
=
0
;
#endif
struct
vec
vec
;
struct
socket
so
;
...
...
@@ -4491,6 +4494,10 @@ static int set_ports_option(struct mg_context *ctx) {
// broadcast UDP sockets
setsockopt
(
so
.
sock
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
void
*
)
&
on
,
sizeof
(
on
))
!=
0
||
#if defined(USE_IPV6)
setsockopt
(
so
.
sock
,
IPPROTO_IPV6
,
IPV6_V6ONLY
,
(
void
*
)
&
off
,
sizeof
(
off
))
!=
0
||
#endif
bind
(
so
.
sock
,
&
so
.
lsa
.
sa
,
sizeof
(
so
.
lsa
))
!=
0
||
listen
(
so
.
sock
,
SOMAXCONN
)
!=
0
)
{
cry
(
fc
(
ctx
),
"%s: cannot bind to %.*s: %s"
,
__func__
,
...
...
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