Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
multicat
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
multicat
Commits
d50d3d06
Commit
d50d3d06
authored
Nov 20, 2018
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util: fix multicast logic (fixes multilive)
parent
cb476ead
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
23 deletions
+32
-23
NEWS
NEWS
+4
-0
util.c
util.c
+28
-23
No files found.
NEWS
View file @
d50d3d06
Changes between 2.3 and 2.4:
----------------------------
* Fix multilive
Changes between 2.2 and 2.3:
----------------------------
* New VRRP-like implementation multilive
...
...
util.c
View file @
d50d3d06
...
...
@@ -905,34 +905,39 @@ normal_bind:
if
(
!*
pb_tcp
)
{
if
(
i_ttl
)
if
(
i_family
==
AF_INET
&&
IN_MULTICAST
(
ntohl
(
connect_addr
.
sin
.
sin_addr
.
s_addr
))
)
{
if
(
i_family
==
AF_INET
&&
IN_MULTICAST
(
ntohl
(
connect_addr
.
sin
.
sin_addr
.
s_addr
))
)
if
(
p_opt
!=
NULL
&&
p_opt
->
pb_multicast
!=
NULL
)
*
p_opt
->
pb_multicast
=
true
;
if
(
i_ttl
&&
setsockopt
(
i_fd
,
IPPROTO_IP
,
IP_MULTICAST_TTL
,
(
void
*
)
&
i_ttl
,
sizeof
(
i_ttl
)
)
==
-
1
)
{
if
(
setsockopt
(
i_fd
,
IPPROTO_IP
,
IP_MULTICAST_TTL
,
(
void
*
)
&
i_ttl
,
sizeof
(
i_ttl
)
)
==
-
1
)
{
msg_Err
(
NULL
,
"couldn't set TTL (%s)"
,
strerror
(
errno
)
);
PrintSocket
(
"socket definition:"
,
&
bind_addr
,
&
connect_addr
);
exit
(
EXIT_FAILURE
);
}
msg_Err
(
NULL
,
"couldn't set TTL (%s)"
,
strerror
(
errno
)
);
PrintSocket
(
"socket definition:"
,
&
bind_addr
,
&
connect_addr
);
exit
(
EXIT_FAILURE
);
}
}
if
(
i_family
==
AF_INET6
&&
IN6_IS_ADDR_MULTICAST
(
&
connect_addr
.
sin6
.
sin6_addr
)
)
if
(
i_family
==
AF_INET6
&&
IN6_IS_ADDR_MULTICAST
(
&
connect_addr
.
sin6
.
sin6_addr
)
)
{
if
(
p_opt
!=
NULL
&&
p_opt
->
pb_multicast
!=
NULL
)
*
p_opt
->
pb_multicast
=
true
;
if
(
i_ttl
&&
setsockopt
(
i_fd
,
IPPROTO_IPV6
,
IPV6_MULTICAST_HOPS
,
(
void
*
)
&
i_ttl
,
sizeof
(
i_ttl
)
)
==
-
1
)
{
if
(
setsockopt
(
i_fd
,
IPPROTO_IPV6
,
IPV6_MULTICAST_HOPS
,
(
void
*
)
&
i_ttl
,
sizeof
(
i_ttl
)
)
==
-
1
)
{
msg_Err
(
NULL
,
"couldn't set TTL (%s)"
,
strerror
(
errno
)
);
PrintSocket
(
"socket definition:"
,
&
bind_addr
,
&
connect_addr
);
exit
(
EXIT_FAILURE
);
}
msg_Err
(
NULL
,
"couldn't set TTL (%s)"
,
strerror
(
errno
)
);
PrintSocket
(
"socket definition:"
,
&
bind_addr
,
&
connect_addr
);
exit
(
EXIT_FAILURE
);
}
}
...
...
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