]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Handle DHCP package in gernal UDP processing path
authorAsias He <asias.hejun@gmail.com>
Sun, 17 Jul 2011 08:56:59 +0000 (16:56 +0800)
committerPekka Enberg <penberg@kernel.org>
Mon, 18 Jul 2011 10:17:16 +0000 (13:17 +0300)
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>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/net/uip/udp.c

index fcd5018a8dc8e762e20c1b624d237cf46c4fccfd..39c2b57a197553ffb054e228111d0b27e726ebf6 100644 (file)
@@ -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
         */