From nobody Thu May 15 03:39:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1518055533930435.00682852550574; Wed, 7 Feb 2018 18:05:33 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2136C0587DF; Thu, 8 Feb 2018 02:05:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9AAF762672; Thu, 8 Feb 2018 02:05:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 632B74A477; Thu, 8 Feb 2018 02:05:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w182567b023209 for ; Wed, 7 Feb 2018 21:05:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0ECD12166BB6; Thu, 8 Feb 2018 02:05:07 +0000 (UTC) Received: from tlap.laine.org.com (ovpn-120-186.rdu2.redhat.com [10.10.120.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC2E22156A30; Thu, 8 Feb 2018 02:05:06 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Wed, 7 Feb 2018 21:04:58 -0500 Message-Id: <20180208020459.16928-9-laine@laine.org> In-Reply-To: <20180208020459.16928-1-laine@laine.org> References: <20180208020459.16928-1-laine@laine.org> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 8/9] filter for proper IP address in tcpdump looking for broadcast packet X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 08 Feb 2018 02:05:33 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In the no-mac-broadcast test, a ping is sent to 192.168.122.255, but tcpdump is set to look for packets with a destination IP of 255.255.255.255. Change it to check for the correct IP address and also for mac broadcast (which is what the no-mac-broadcast filter actually looks at). This should eliminate the "false success" that was happening because tcpdump wasn't actually seeing the broadcast packet the guest was sending, as well as catching the "false failure" caused by tcpdump seeing other traffic from the guest unrelated to the test (which happened to be broadcasts sent to 255.255.255.255). --- scripts/nwfilter/230-no-mac-broadcast.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nwfilter/230-no-mac-broadcast.t b/scripts/nwfilter/230= -no-mac-broadcast.t index 8895a53..f05a9c2 100644 --- a/scripts/nwfilter/230-no-mac-broadcast.t +++ b/scripts/nwfilter/230-no-mac-broadcast.t @@ -80,7 +80,7 @@ ok($ebtable =3D~ "-d Broadcast -j DROP", "check ebtables = entry for \"-d Broadcast =20 # prepare tcpdump diag "prepare tcpdump"; -system("/usr/sbin/tcpdump -v -i virbr0 -n host 255.255.255.255 2> /tmp/tcp= dump.log &"); +system("/usr/sbin/tcpdump -v -i virbr0 -n host 192.168.122.255 and ether h= ost ff:ff:ff:ff:ff:ff 2> /tmp/tcpdump.log &"); =20 # log into guest diag "ssh'ing into $guestip"; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list