* [Qemu-devel] [PATCH] fix dhcp with multiple nics an SLIRP
@ 2007-06-29 12:52 Jason Wessel
0 siblings, 0 replies; only message in thread
From: Jason Wessel @ 2007-06-29 12:52 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
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 <jason.wessel@windriver.com>
Jason.
[-- Attachment #2: slirp_fix_multiple_dhcp.patch --]
[-- Type: text/x-patch, Size: 661 bytes --]
---
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-29 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29 12:52 [Qemu-devel] [PATCH] fix dhcp with multiple nics an SLIRP Jason Wessel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).