Call setsockopt(2) IP_MULTICAST_LOOP w/ correct optlen.
This fixes UDP multicast socket networking. bump PKGNAME OK sturm@, todd@
This commit is contained in:
parent
8fa3cbcd52
commit
a5272e87e0
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.16 2006/12/22 17:31:45 todd Exp $
|
||||
# $OpenBSD: Makefile,v 1.17 2007/01/10 20:20:06 mpf Exp $
|
||||
|
||||
# no success building on other archs yet
|
||||
ONLY_FOR_ARCHS= amd64 arm i386 powerpc
|
||||
@ -6,6 +6,7 @@ ONLY_FOR_ARCHS= amd64 arm i386 powerpc
|
||||
COMMENT= "multi system emulator"
|
||||
|
||||
DISTNAME= qemu-0.8.2
|
||||
PKGNAME= ${DISTNAME}p1
|
||||
CATEGORIES= emulators
|
||||
|
||||
HOMEPAGE= http://fabrice.bellard.free.fr/qemu/
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- vl.c.orig Mon Dec 18 16:55:53 2006
|
||||
+++ vl.c Mon Dec 18 17:06:04 2006
|
||||
--- vl.c.orig Sat Jul 22 19:23:34 2006
|
||||
+++ vl.c Wed Jan 3 15:14:21 2007
|
||||
@@ -43,7 +43,8 @@
|
||||
#include <netdb.h>
|
||||
#ifdef _BSD
|
||||
@ -123,6 +123,15 @@
|
||||
|
||||
fstat(fd, &s);
|
||||
dev = devname(s.st_rdev, S_IFCHR);
|
||||
@@ -3279,7 +3354,7 @@ static int net_socket_mcast_create(struc
|
||||
/* Force mcast msgs to loopback (eg. several QEMUs in same host */
|
||||
val = 1;
|
||||
ret=setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP,
|
||||
- (const char *)&val, sizeof(val));
|
||||
+ (const char *)&val, sizeof(char));
|
||||
if (ret < 0) {
|
||||
perror("setsockopt(SOL_IP, IP_MULTICAST_LOOP)");
|
||||
goto fail;
|
||||
@@ -3535,7 +3610,8 @@ static int net_socket_mcast_init(VLANSta
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user