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
1b50a1e4
Commit
1b50a1e4
authored
Apr 14, 1999
by
Martin Mareš
Browse files
Next attempt to get SO_BINDTODEVICE work :)
parent
36154beb
Changes
1
Hide whitespace changes
Inline
Side-by-side
sysdep/unix/io.c
View file @
1b50a1e4
...
...
@@ -16,6 +16,10 @@
#include <unistd.h>
#include <errno.h>
#ifndef HAVE_STRUCT_IP_MREQN
#include <net/if.h>
#endif
#include "nest/bird.h"
#include "lib/lists.h"
#include "lib/resource.h"
...
...
@@ -413,6 +417,12 @@ sk_open(sock *s)
ASSERT
(
s
->
iface
);
mreq
.
imr_ifindex
=
s
->
iface
->
index
;
set_inaddr
(
&
mreq
.
imr_address
,
s
->
iface
->
ip
);
#else
struct
in_addr
mreq
;
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
;
...
...
@@ -423,12 +433,6 @@ sk_open(sock *s)
#else
#error Multicasts not supported on PtP devices
/* FIXME: Solve it somehow? */
#endif
#else
struct
in_addr
mreq
;
struct
ip_mreq
mreq_add
;
ASSERT
(
s
->
iface
);
set_inaddr
(
&
mreq
,
s
->
iface
->
ip
);
mreq_add
.
imr_interface
=
mreq
;
#endif
set_inaddr
(
&
mreq_add
.
imr_multiaddr
,
s
->
daddr
);
if
(
has_dest
)
...
...
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