From nobody Tue Feb 10 20:06:42 2026 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 1506276789845824.8762956544625; Sun, 24 Sep 2017 11:13:09 -0700 (PDT) Received: from localhost ([::1]:38987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwBOq-0007jn-6O for importer@patchew.org; Sun, 24 Sep 2017 14:13:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwBKp-0004Z3-7q for qemu-devel@nongnu.org; Sun, 24 Sep 2017 14:08:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwBKn-00058e-Ep for qemu-devel@nongnu.org; Sun, 24 Sep 2017 14:08:55 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:49421) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwBKn-00058A-7y for qemu-devel@nongnu.org; Sun, 24 Sep 2017 14:08:53 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 3821BE9D6; Sun, 24 Sep 2017 20:08:53 +0200 (CEST) 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 H3LI8an-rBnm; Sun, 24 Sep 2017 20:08:51 +0200 (CEST) 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 D54C9E9D7; Sun, 24 Sep 2017 20:08:49 +0200 (CEST) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.89) (envelope-from ) id 1dwBKi-000500-CU; Sun, 24 Sep 2017 20:08:48 +0200 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org Date: Sun, 24 Sep 2017 20:08:48 +0200 Message-Id: <20170924180848.19168-4-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170924180848.19168-1-samuel.thibault@ens-lyon.org> References: <20170924180848.19168-1-samuel.thibault@ens-lyon.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 141.255.128.1 Subject: [Qemu-devel] [PULL 3/3] slirp: Add a special case for the NULL socket 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: jan.kiszka@siemens.com, Kevin Cernekee , stefanha@redhat.com, Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Kevin Cernekee NULL sockets are used for NDP, BOOTP, and other critical operations. If the topmost mbuf in a NULL session is blocked pending resolution, it may cause problems if it blocks other packets with a NULL socket. So do not add mbufs with a NULL socket field to the same session. Signed-off-by: Kevin Cernekee Signed-off-by: Samuel Thibault --- slirp/if.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/slirp/if.c b/slirp/if.c index 6262d77495..590753c658 100644 --- a/slirp/if.c +++ b/slirp/if.c @@ -73,14 +73,16 @@ if_output(struct socket *so, struct mbuf *ifm) * We mustn't put this packet back on the fastq (or we'll send it out of = order) * XXX add cache here? */ - for (ifq =3D (struct mbuf *) slirp->if_batchq.qh_rlink; - (struct quehead *) ifq !=3D &slirp->if_batchq; - ifq =3D ifq->ifq_prev) { - if (so =3D=3D ifq->ifq_so) { - /* A match! */ - ifm->ifq_so =3D so; - ifs_insque(ifm, ifq->ifs_prev); - goto diddit; + if (so) { + for (ifq =3D (struct mbuf *) slirp->if_batchq.qh_rlink; + (struct quehead *) ifq !=3D &slirp->if_batchq; + ifq =3D ifq->ifq_prev) { + if (so =3D=3D ifq->ifq_so) { + /* A match! */ + ifm->ifq_so =3D so; + ifs_insque(ifm, ifq->ifs_prev); + goto diddit; + } } } =20 --=20 2.14.1