summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2006-03-17 11:38:36 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2006-03-17 11:38:36 +0000
commitb155147d7095ee71ac3872f11d42227483d9ecce (patch)
treeeab89e0a880717a8d943251550aeb263bfba492d /avahi-core
parentc809f13a12f9ac155ae6c49b73a931714b70b4dc (diff)
Patch from sjoerd simons to close Ticket #19 (Doesn't work on 64 bit machines with 32 bit userspace)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1178 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/avahi-core/socket.c b/avahi-core/socket.c
index 82622d3..453ce54 100644
--- a/avahi-core/socket.c
+++ b/avahi-core/socket.c
@@ -513,7 +513,7 @@ int avahi_send_dns_packet_ipv4(int fd, AvahiIfIndex interface, AvahiDnsPacket *p
pkti->ipi_spec_dst.s_addr = src_address->address;
msg.msg_control = cmsg_data;
- msg.msg_controllen = sizeof(cmsg_data);
+ msg.msg_controllen = CMSG_SPACE(sizeof(struct in_pktinfo));
}
#elif defined(IP_SENDSRCADDR)
if (src_address) {
@@ -529,7 +529,7 @@ int avahi_send_dns_packet_ipv4(int fd, AvahiIfIndex interface, AvahiDnsPacket *p
addr->s_addr = src_address->address;
msg.msg_control = cmsg_data;
- msg.msg_controllen = sizeof(cmsg_data);
+ msg.msg_controllen = CMSG_SPACE(sizeof(struct in_addr));
}
#elif defined(IP_MULTICAST_IF)
{
@@ -592,7 +592,7 @@ int avahi_send_dns_packet_ipv6(int fd, AvahiIfIndex interface, AvahiDnsPacket *p
memcpy(&pkti->ipi6_addr, src_address->address, sizeof(src_address->address));
msg.msg_control = cmsg_data;
- msg.msg_controllen = sizeof(cmsg_data);
+ msg.msg_controllen = CMSG_SPACE(sizeof(struct in6_pktinfo));
} else {
msg.msg_control = NULL;
msg.msg_controllen = 0;