Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
4c5e5e3a
Commit
4c5e5e3a
authored
Apr 14, 1999
by
Martin Mareš
Browse files
Multicasts once again: When using SO_BINDTODEVICE, don't specify IP address
of the interface.
parent
1b50a1e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
sysdep/unix/io.c
View file @
4c5e5e3a
...
...
@@ -422,16 +422,17 @@ sk_open(sock *s)
struct
ip_mreq
mreq_add
;
ASSERT
(
s
->
iface
);
set_inaddr
(
&
mreq
,
s
->
iface
->
ip
);
mreq_add
.
imr_interface
=
mreq
;
#ifdef SO_BINDTODEVICE
{
struct
ifreq
ifr
;
strcpy
(
ifr
.
ifr_name
,
s
->
iface
->
name
);
if
(
setsockopt
(
fd
,
SOL_SOCKET
,
SO_BINDTODEVICE
,
&
ifr
,
sizeof
(
ifr
))
<
0
)
ERR
(
"SO_BINDTODEVICE"
);
mreq_add
.
imr_interface
.
s_addr
=
INADDR_ANY
;
}
#else
#error Multicasts not supported on PtP devices
/* FIXME: Solve it somehow? */
mreq_add
.
imr_interface
=
mreq
;
#endif
#endif
set_inaddr
(
&
mreq_add
.
imr_multiaddr
,
s
->
daddr
);
...
...
Write
Preview
Supports
Markdown
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