]> Git Repo - qemu.git/blobdiff - slirp/udp6.c
rtc-test: cleanup register_b_set_flag test
[qemu.git] / slirp / udp6.c
index a23026f2e4d6b4182937b660506316b7a964935e..9fa314bc2dd2a8ffba2f296c1f14c23be6fd0694 100644 (file)
@@ -6,8 +6,8 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "slirp.h"
-#include "qemu/osdep.h"
 #include "udp.h"
+#include "dhcpv6.h"
 
 void udp6_input(struct mbuf *m)
 {
@@ -62,7 +62,17 @@ void udp6_input(struct mbuf *m)
     lhost.sin6_addr = ip->ip_src;
     lhost.sin6_port = uh->uh_sport;
 
-    /* TODO handle DHCP/BOOTP */
+    /* handle DHCPv6 */
+    if (ntohs(uh->uh_dport) == DHCPV6_SERVER_PORT &&
+        (in6_equal(&ip->ip_dst, &slirp->vhost_addr6) ||
+         in6_equal(&ip->ip_dst, &(struct in6_addr)ALLDHCP_MULTICAST))) {
+        m->m_data += iphlen;
+        m->m_len -= iphlen;
+        dhcpv6_input(&lhost, m);
+        m->m_data -= iphlen;
+        m->m_len += iphlen;
+        goto bad;
+    }
 
     /* handle TFTP */
     if (ntohs(uh->uh_dport) == TFTP_SERVER &&
This page took 0.023511 seconds and 4 git commands to generate.