- fix multicast virtual networks; setsockopt(SOL_IP, IP_MULTICAST_LOOP)
takes a u_char, not int as in the 0.13.0 qemu code. from mcbride@ with name change by fgsch@. - fix copy-and-pasto in the sample qemu-ifdown script resulting in tun interface not being removed and errors when qemu closes. from me. ok mcbride@(first part) fgsch@ ajacoutot@ landry@
This commit is contained in:
parent
223ba194c4
commit
e252552d65
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.60 2011/01/19 16:22:31 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.61 2011/01/26 13:51:43 sthen Exp $
|
||||
|
||||
# no success building on other archs yet
|
||||
ONLY_FOR_ARCHS = i386 amd64 sparc64
|
||||
@ -6,7 +6,7 @@ ONLY_FOR_ARCHS = i386 amd64 sparc64
|
||||
COMMENT = multi system emulator
|
||||
|
||||
DISTNAME = qemu-0.13.0
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
CATEGORIES = emulators
|
||||
|
||||
HOMEPAGE = http://www.qemu.org/
|
||||
|
@ -11,4 +11,4 @@ if test `id -u` -ne 0; then
|
||||
SUDO=sudo
|
||||
fi
|
||||
|
||||
$SUDO ifconfig $brif del $1 > /dev/null 2>&1
|
||||
$SUDO ifconfig $BRIDGE del $1 > /dev/null 2>&1
|
||||
|
23
emulators/qemu/patches/patch-net_socket_c
Normal file
23
emulators/qemu/patches/patch-net_socket_c
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-net_socket_c,v 1.1 2011/01/26 13:51:43 sthen Exp $
|
||||
--- net/socket.c.orig Sat Oct 16 05:56:09 2010
|
||||
+++ net/socket.c Tue Jan 25 05:57:04 2011
|
||||
@@ -154,6 +154,7 @@ static int net_socket_mcast_create(struct sockaddr_in
|
||||
struct ip_mreq imr;
|
||||
int fd;
|
||||
int val, ret;
|
||||
+ u_char loop;
|
||||
if (!IN_MULTICAST(ntohl(mcastaddr->sin_addr.s_addr))) {
|
||||
fprintf(stderr, "qemu: error: specified mcastaddr \"%s\" (0x%08x) does not contain a multicast address\n",
|
||||
inet_ntoa(mcastaddr->sin_addr),
|
||||
@@ -193,9 +194,9 @@ static int net_socket_mcast_create(struct sockaddr_in
|
||||
}
|
||||
|
||||
/* Force mcast msgs to loopback (eg. several QEMUs in same host */
|
||||
- val = 1;
|
||||
+ loop = 1;
|
||||
ret=setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP,
|
||||
- (const char *)&val, sizeof(val));
|
||||
+ (const char *)&loop, sizeof(loop));
|
||||
if (ret < 0) {
|
||||
perror("setsockopt(SOL_IP, IP_MULTICAST_LOOP)");
|
||||
goto fail;
|
Loading…
x
Reference in New Issue
Block a user