From nobody Tue Feb 10 20:28:24 2026 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 1549595356889288.8854236569266; Thu, 7 Feb 2019 19:09:16 -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 64AFB8666B; Fri, 8 Feb 2019 03:09:14 +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 1C9D462985; Fri, 8 Feb 2019 03:09:14 +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 B3EF63F954; Fri, 8 Feb 2019 03:09:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1838ekH007798 for ; Thu, 7 Feb 2019 22:08:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 761E916BFF; Fri, 8 Feb 2019 03:08:40 +0000 (UTC) Received: from vhost2.laine.org (ovpn-116-56.phx2.redhat.com [10.3.116.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DF2D18E22; Fri, 8 Feb 2019 03:08:40 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Thu, 7 Feb 2019 22:08:31 -0500 Message-Id: <20190208030831.6790-5-laine@laine.org> In-Reply-To: <20190208030831.6790-1-laine@laine.org> References: <20190208030831.6790-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 4/4] nwfilter: allow for ebtables *not* removing leading 0 from mac addresses 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: , 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.26]); Fri, 08 Feb 2019 03:09:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The ebtables command in RHEL8 prints 00 in a MAC address as.... "00", unlike e.g. Fedora 29, which prints it as "0". Allow for both. Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrang=C3=A9 --- scripts/nwfilter/100-ping-still-working.t | 4 ++-- scripts/nwfilter/210-no-mac-spoofing.t | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/nwfilter/100-ping-still-working.t b/scripts/nwfilter/1= 00-ping-still-working.t index a88eb02..656722d 100644 --- a/scripts/nwfilter/100-ping-still-working.t +++ b/scripts/nwfilter/100-ping-still-working.t @@ -76,9 +76,9 @@ diag "ip is $guestip"; my $ebtables =3D (-e '/sbin/ebtables') ? '/sbin/ebtables' : '/usr/sbin/ebt= ables'; my $ebtable =3D `$ebtables -L;$ebtables -t nat -L`; diag $ebtable; -# ebtables shortens :00: to :0: so we need to do that too +# ebtables *might* shorten :00: to :0: so we need to allow for both when s= earching $_ =3D $mac; -s/00/0/g; +s/0([0-9])/0{0,1}$1/g; ok($ebtable =3D~ $_, "check ebtables entry"); =20 # ping guest1 diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-= no-mac-spoofing.t index 78c500c..95f003a 100644 --- a/scripts/nwfilter/210-no-mac-spoofing.t +++ b/scripts/nwfilter/210-no-mac-spoofing.t @@ -81,9 +81,9 @@ diag "guest ip is $guestip"; my $ebtables =3D (-e '/sbin/ebtables') ? '/sbin/ebtables' : '/usr/sbin/ebt= ables'; my $ebtable =3D `$ebtables -L;$ebtables -t nat -L`; diag $ebtable; -# ebtables shortens :00: to :0: so we need to do that too +# ebtables *might* shorten :00: to :0: so we need to allow for both when s= earching $_ =3D $mac; -s/00/0/g;=20 +s/0([0-9])/0{0,1}$1/g; ok($ebtable =3D~ $_, "check ebtables entry"); =20 my $macfalse =3D "52:54:00:f9:21:22"; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list