[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] fix dhcp with multiple nics an SLIRP
From: |
Jason Wessel |
Subject: |
[Qemu-devel] [PATCH] fix dhcp with multiple nics an SLIRP |
Date: |
Fri, 29 Jun 2007 07:52:46 -0500 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20070530) |
The check in qemu_can_send_packet() does not work correctly when using
multiple nics. I found the problem when using -boot n and having more
than one nic in use with the SLIRP networking. The
qemu_can_send_packet() is only called as a part of the SLIRP networking
check to see if there is a valid interface that packets can be sent on.
Using the attached patch, a pxe boot can be used with more than one nic,
in particular using nics of different types. I also tested to make sure
it still worked with a single nic as well.
Signed-off-by: Jason Wessel <address@hidden>
Jason.
---
vl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: qemu/vl.c
===================================================================
--- qemu.orig/vl.c
+++ qemu/vl.c
@@ -3195,11 +3195,11 @@ int qemu_can_send_packet(VLANClientState
for(vc = vlan->first_client; vc != NULL; vc = vc->next) {
if (vc != vc1) {
- if (vc->fd_can_read && !vc->fd_can_read(vc->opaque))
- return 0;
+ if (vc->fd_can_read && vc->fd_can_read(vc->opaque))
+ return 1;
}
}
- return 1;
+ return 0;
}
void qemu_send_packet(VLANClientState *vc1, const uint8_t *buf, int size)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] fix dhcp with multiple nics an SLIRP,
Jason Wessel <=