diff mbox

[11/16] kvm tools: Handle DHCP package in gernal UDP processing path

Message ID 1310893024-21615-12-git-send-email-asias.hejun@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Asias He July 17, 2011, 8:56 a.m. UTC
DHCP packages are handled by the hypervisor, they are not sent to remote
servers. In contrast, all other non-DHCP UDP packages are sent to remote
servers.

Signed-off-by: Asias He <asias.hejun@gmail.com>
---
 tools/kvm/net/uip/udp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/tools/kvm/net/uip/udp.c b/tools/kvm/net/uip/udp.c
index fcd5018..39c2b57 100644
--- a/tools/kvm/net/uip/udp.c
+++ b/tools/kvm/net/uip/udp.c
@@ -210,6 +210,11 @@  int uip_tx_do_ipv4_udp(struct uip_tx_arg *arg)
 	ip	= (struct uip_ip *)(arg->eth);
 	info	= arg->info;
 
+	if (uip_udp_is_dhcp(udp)) {
+		uip_tx_do_ipv4_udp_dhcp(arg);
+		return 0;
+	}
+
 	/*
 	 * Find socket we have allocated before, otherwise allocate one
 	 */