summaryrefslogtreecommitdiffstats
path: root/sysdep
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-04-14 14:29:47 +0200
committerMartin Mares <mj@ucw.cz>1999-04-14 14:29:47 +0200
commit4c5e5e3a1c438cb2e92535e3fabc458aa0d6deb3 (patch)
tree92ed30f87370009f356dee9e3ed063e1b991bf61 /sysdep
parent1b50a1e4be2b54bd4ccadfaeaf558aea15255de4 (diff)
downloadbird-4c5e5e3a1c438cb2e92535e3fabc458aa0d6deb3.tar
bird-4c5e5e3a1c438cb2e92535e3fabc458aa0d6deb3.zip
Multicasts once again: When using SO_BINDTODEVICE, don't specify IP address
of the interface.
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index f5e3124..7764d3d 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -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);