]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
slirp: add in6_dhcp_multicast()
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 8 Jan 2018 17:29:01 +0000 (14:29 -0300)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 14 Jan 2018 17:16:13 +0000 (18:16 +0100)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
slirp/dhcpv6.h
slirp/udp6.c

index 9189cd3f2d3c68cf47f9279e286773db5e493c85..3373f6cb89d05ea7fe816269cadf6b7fff70d159 100644 (file)
@@ -17,6 +17,9 @@
                             0x00, 0x00, 0x00, 0x00,\
                             0x00, 0x01, 0x00, 0x02 } }
 
+#define in6_dhcp_multicast(a)\
+    in6_equal(a, &(struct in6_addr)ALLDHCP_MULTICAST)
+
 void dhcpv6_input(struct sockaddr_in6 *srcsas, struct mbuf *m);
 
 #endif
index 9fa314bc2dd2a8ffba2f296c1f14c23be6fd0694..7c4a6b003a832d63db4b02bb065b3738e6a18e63 100644 (file)
@@ -65,7 +65,7 @@ void udp6_input(struct mbuf *m)
     /* 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))) {
+         in6_dhcp_multicast(&ip->ip_dst))) {
         m->m_data += iphlen;
         m->m_len -= iphlen;
         dhcpv6_input(&lhost, m);