[farsight2/master] Binding to interface 0 / INADDR_ANY by default
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:21:03 PST 2008
---
transmitters/multicast/fs-multicast-transmitter.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/transmitters/multicast/fs-multicast-transmitter.c b/transmitters/multicast/fs-multicast-transmitter.c
index f82e830..bd03ddf 100644
--- a/transmitters/multicast/fs-multicast-transmitter.c
+++ b/transmitters/multicast/fs-multicast-transmitter.c
@@ -982,11 +982,17 @@ fs_multicast_transmitter_get_group (FsMulticastTransmitter *trans,
}
if (udpport->requested_ip &&
- !inet_aton (udpport->requested_ip, &mcast->mreqn.imr_address)) {
+ !inet_aton (udpport->requested_ip, &mcast->mreqn.imr_address))
+ {
g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"UdpPort address invalid");
goto error;
}
+ else
+ {
+ mcast->mreqn.imr_address.s_addr = INADDR_ANY;
+ }
+ mcast->mreqn.imr_ifindex = 0;
if (setsockopt (udpport->fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
&(mcast->mreqn), sizeof (mcast->mreqn)) < 0)
--
1.5.6.5
More information about the farsight-commits
mailing list