[libvirt] [PATCH] Cope with newer ebtables tools in testvm.fwall.dat

Eric Blake eblake at redhat.com
Thu Mar 27 12:07:12 UTC 2014


On 03/27/2014 05:44 AM, Daniel P. Berrange wrote:
> Newer ebtables tools turn 0x8035 into RARP, so our test
> file must expect this.
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  scripts/nwfilter/nwfilterxml2fwallout/testvm.fwall.dat | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

ACK

> -#ebtables -t nat -L libvirt-I-vnet0 | grep -v "^Bridge" | grep -v "^$"
> +#ebtables -t nat -L libvirt-I-vnet0 | sed s/0x8035/RARP/g | grep -v "^Bridge" | grep -v "^$"

You know, sed|grep|grep is overkill, when you could do it all in sed:

ebtables -t nat -L libvirt-I-vnet0 | \
  sed 's/0x8035/RARP/g; /^Bridge/d; /^$/d'

But I don't care about the minor efficiency gain enough to demand the
change.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140327/0bbf6608/attachment-0001.sig>


More information about the libvir-list mailing list