From nobody Mon May 6 00:57:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515950742218748.2740415574111; Sun, 14 Jan 2018 09:25:42 -0800 (PST) Received: from localhost ([::1]:51182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eam2P-00039b-Ev for importer@patchew.org; Sun, 14 Jan 2018 12:25:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ealxr-000062-OY for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ealxq-0002IM-Pp for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:20:59 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:57560) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ealxq-0002H7-J4 for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:20:58 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id BEE1310AF3; Sun, 14 Jan 2018 18:20:56 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EXQPKKqNAys7; Sun, 14 Jan 2018 18:20:55 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id DC1A010AE8; Sun, 14 Jan 2018 18:20:54 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.90) (envelope-from ) id 1ealxm-0000Hl-7o; Sun, 14 Jan 2018 18:20:54 +0100 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sun, 14 Jan 2018 18:20:49 +0100 Message-Id: <20180114172053.1051-2-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> References: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a0c:e300::1 Subject: [Qemu-devel] [PULL 1/5] slirp: avoid IN6_IS_ADDR_UNSPECIFIED(), rather use in6_zero() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Thibault , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Host: Mac OS 10.12.5 Compiler: Apple LLVM version 8.1.0 (clang-802.0.42) slirp/ip6_icmp.c:80:38: warning: taking address of packed member 'ip_src'= of class or structure 'ip6' may result in an unaligned pointer value [-Waddress-of-packed-member] IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src)) { ^~~~~~~~~~ /usr/include/netinet6/in6.h:238:42: note: expanded from macro 'IN6_IS_ADD= R_UNSPECIFIED' ((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) =3D=3D 0)= && \ ^ Reported-by: John Arbuckle Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Samuel Thibault --- slirp/ip6_icmp.c | 6 +++--- slirp/ndp_table.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slirp/ip6_icmp.c b/slirp/ip6_icmp.c index 777eb574be..ee333d05a2 100644 --- a/slirp/ip6_icmp.c +++ b/slirp/ip6_icmp.c @@ -77,7 +77,7 @@ void icmp6_send_error(struct mbuf *m, uint8_t type, uint8= _t code) DEBUG_ARGS((dfd, " type =3D %d, code =3D %d\n", type, code)); =20 if (IN6_IS_ADDR_MULTICAST(&ip->ip_src) || - IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src)) { + in6_zero(&ip->ip_src)) { /* TODO icmp error? */ return; } @@ -272,7 +272,7 @@ static void ndp_send_na(Slirp *slirp, struct ip6 *ip, s= truct icmp6 *icmp) struct mbuf *t =3D m_get(slirp); struct ip6 *rip =3D mtod(t, struct ip6 *); rip->ip_src =3D icmp->icmp6_nns.target; - if (IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src)) { + if (in6_zero(&ip->ip_src)) { rip->ip_dst =3D (struct in6_addr)ALLNODES_MULTICAST; } else { rip->ip_dst =3D ip->ip_src; @@ -350,7 +350,7 @@ static void ndp_input(struct mbuf *m, Slirp *slirp, str= uct ip6 *ip, && icmp->icmp6_code =3D=3D 0 && !IN6_IS_ADDR_MULTICAST(&icmp->icmp6_nns.target) && ntohs(ip->ip_pl) >=3D ICMP6_NDP_NS_MINLEN - && (!IN6_IS_ADDR_UNSPECIFIED(&ip->ip_src) + && (!in6_zero(&ip->ip_src) || in6_solicitednode_multicast(&ip->ip_dst))) { if (in6_equal_host(&icmp->icmp6_nns.target)) { /* Gratuitous NDP */ diff --git a/slirp/ndp_table.c b/slirp/ndp_table.c index 9d4c39b45c..e1676a0a7b 100644 --- a/slirp/ndp_table.c +++ b/slirp/ndp_table.c @@ -23,7 +23,7 @@ void ndp_table_add(Slirp *slirp, struct in6_addr ip_addr, ethaddr[0], ethaddr[1], ethaddr[2], ethaddr[3], ethaddr[4], ethaddr[5])); =20 - if (IN6_IS_ADDR_MULTICAST(&ip_addr) || IN6_IS_ADDR_UNSPECIFIED(&ip_add= r)) { + if (IN6_IS_ADDR_MULTICAST(&ip_addr) || in6_zero(&ip_addr)) { /* Do not register multicast or unspecified addresses */ DEBUG_CALL(" abort: do not register multicast or unspecified addre= ss"); return; @@ -60,7 +60,7 @@ bool ndp_table_search(Slirp *slirp, struct in6_addr ip_ad= dr, DEBUG_ARG("ip =3D %s", addrstr); #endif =20 - assert(!IN6_IS_ADDR_UNSPECIFIED(&ip_addr)); + assert(!in6_zero(&ip_addr)); =20 /* Multicast address: fec0::abcd:efgh/8 -> 33:33:ab:cd:ef:gh */ if (IN6_IS_ADDR_MULTICAST(&ip_addr)) { --=20 2.15.1 From nobody Mon May 6 00:57:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515950599505169.79182490727146; Sun, 14 Jan 2018 09:23:19 -0800 (PST) Received: from localhost ([::1]:51052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ealzv-00016n-4l for importer@patchew.org; Sun, 14 Jan 2018 12:23:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ealxr-00005z-FT for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ealxq-0002I9-NR for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:20:59 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:57546) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ealxq-0002Gj-GH for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:20:58 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 59CBF10AE0; Sun, 14 Jan 2018 18:20:56 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J380roxDrw9L; Sun, 14 Jan 2018 18:20:55 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id E8D7010AEB; Sun, 14 Jan 2018 18:20:54 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.90) (envelope-from ) id 1ealxm-0000Hn-8g; Sun, 14 Jan 2018 18:20:54 +0100 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sun, 14 Jan 2018 18:20:50 +0100 Message-Id: <20180114172053.1051-3-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> References: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a0c:e300::1 Subject: [Qemu-devel] [PULL 2/5] slirp: remove unused header X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Thibault , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Thomas Huth Signed-off-by: Samuel Thibault --- slirp/slirp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/slirp/slirp.h b/slirp/slirp.h index 898ec9516d..06febfc78b 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -1,7 +1,6 @@ #ifndef SLIRP_H #define SLIRP_H =20 -#include "qemu/host-utils.h" #include "slirp_config.h" =20 #ifdef _WIN32 --=20 2.15.1 From nobody Mon May 6 00:57:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515950599502914.1299938285571; Sun, 14 Jan 2018 09:23:19 -0800 (PST) Received: from localhost ([::1]:51057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ealzz-0001Af-0F for importer@patchew.org; Sun, 14 Jan 2018 12:23:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ealxv-000082-LY for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ealxr-0002If-1z for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:03 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:47702) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ealxq-0002Hk-Rg for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:20:58 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id DF20A10AEB; Sun, 14 Jan 2018 18:20:57 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q_92vStiCUeg; Sun, 14 Jan 2018 18:20:56 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 0EE1B10AEC; Sun, 14 Jan 2018 18:20:54 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.90) (envelope-from ) id 1ealxm-0000Hp-9c; Sun, 14 Jan 2018 18:20:54 +0100 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sun, 14 Jan 2018 18:20:51 +0100 Message-Id: <20180114172053.1051-4-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> References: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.233.100.1 Subject: [Qemu-devel] [PULL 3/5] slirp: remove unnecessary struct declaration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Thibault , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Samuel Thibault --- slirp/libslirp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/slirp/libslirp.h b/slirp/libslirp.h index f90f0f524c..540b3e5903 100644 --- a/slirp/libslirp.h +++ b/slirp/libslirp.h @@ -3,7 +3,6 @@ =20 #include "qemu-common.h" =20 -struct Slirp; typedef struct Slirp Slirp; =20 int get_dns_addr(struct in_addr *pdns_addr); --=20 2.15.1 From nobody Mon May 6 00:57:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515950743483493.04912812128487; Sun, 14 Jan 2018 09:25:43 -0800 (PST) Received: from localhost ([::1]:51183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eam2Q-0003Ad-OM for importer@patchew.org; Sun, 14 Jan 2018 12:25:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ealxv-000081-LT for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ealxr-0002Il-26 for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:03 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:47692) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ealxq-0002Hc-Ra for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:20:58 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 66C7810AE8; Sun, 14 Jan 2018 18:20:57 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GkCrLIF4phLB; Sun, 14 Jan 2018 18:20:56 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 195F310AEE; Sun, 14 Jan 2018 18:20:54 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.90) (envelope-from ) id 1ealxm-0000Hr-AV; Sun, 14 Jan 2018 18:20:54 +0100 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sun, 14 Jan 2018 18:20:52 +0100 Message-Id: <20180114172053.1051-5-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> References: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.233.100.1 Subject: [Qemu-devel] [PULL 4/5] slirp: removed unused code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Thibault , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Signed-off-by: Samuel Thibault --- slirp/ip.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/slirp/ip.h b/slirp/ip.h index 1df6723357..59cf4aa918 100644 --- a/slirp/ip.h +++ b/slirp/ip.h @@ -233,17 +233,4 @@ struct ipasfrag { #define ipf_next ipf_link.next #define ipf_prev ipf_link.prev =20 -/* - * Structure stored in mbuf in inpcb.ip_options - * and passed to ip_output when ip options are in use. - * The actual length of the options (including ipopt_dst) - * is in m_len. - */ -#define MAX_IPOPTLEN 40 - -struct ipoption { - struct in_addr ipopt_dst; /* first-hop dst if source routed */ - int8_t ipopt_list[MAX_IPOPTLEN]; /* options proper */ -} QEMU_PACKED; - #endif --=20 2.15.1 From nobody Mon May 6 00:57:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515950599499348.8629385203078; Sun, 14 Jan 2018 09:23:19 -0800 (PST) Received: from localhost ([::1]:51054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ealzv-00017i-7T for importer@patchew.org; Sun, 14 Jan 2018 12:23:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ealxt-00006b-P4 for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ealxs-0002KX-Vl for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:01 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:57584) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ealxs-0002Jh-Ov for qemu-devel@nongnu.org; Sun, 14 Jan 2018 12:21:00 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 88D2C10AEB; Sun, 14 Jan 2018 18:20:59 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l8c6fnYzZ8wj; Sun, 14 Jan 2018 18:20:57 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 15A7010AED; Sun, 14 Jan 2018 18:20:54 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.90) (envelope-from ) id 1ealxm-0000Hu-BY; Sun, 14 Jan 2018 18:20:54 +0100 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sun, 14 Jan 2018 18:20:53 +0100 Message-Id: <20180114172053.1051-6-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> References: <20180114172053.1051-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a0c:e300::1 Subject: [Qemu-devel] [PULL 5/5] slirp: add in6_dhcp_multicast() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Thibault , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Samuel Thibault --- slirp/dhcpv6.h | 3 +++ slirp/udp6.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/slirp/dhcpv6.h b/slirp/dhcpv6.h index 9189cd3f2d..3373f6cb89 100644 --- a/slirp/dhcpv6.h +++ b/slirp/dhcpv6.h @@ -17,6 +17,9 @@ 0x00, 0x00, 0x00, 0x00,\ 0x00, 0x01, 0x00, 0x02 } } =20 +#define in6_dhcp_multicast(a)\ + in6_equal(a, &(struct in6_addr)ALLDHCP_MULTICAST) + void dhcpv6_input(struct sockaddr_in6 *srcsas, struct mbuf *m); =20 #endif diff --git a/slirp/udp6.c b/slirp/udp6.c index 9fa314bc2d..7c4a6b003a 100644 --- a/slirp/udp6.c +++ b/slirp/udp6.c @@ -65,7 +65,7 @@ void udp6_input(struct mbuf *m) /* handle DHCPv6 */ if (ntohs(uh->uh_dport) =3D=3D 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 +=3D iphlen; m->m_len -=3D iphlen; dhcpv6_input(&lhost, m); --=20 2.15.1