From 2ad550ffeaf214e167677fc9be57f4c3b1a61be0 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Sat, 30 Oct 2010 13:19:31 -0700 Subject: Fix 5247: Firewall groups CLI becomes out of sync with ipset when sets and deletes are contained within a single commit --- scripts/firewall/vyatta-ipset.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/firewall/vyatta-ipset.pl b/scripts/firewall/vyatta-ipset.pl index 8614581..4d4cded 100755 --- a/scripts/firewall/vyatta-ipset.pl +++ b/scripts/firewall/vyatta-ipset.pl @@ -13,7 +13,7 @@ # General Public License for more details. # # This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2009 Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2009-2010 Vyatta, Inc. # All Rights Reserved. # # Author: Stig Thormodsrud @@ -158,7 +158,7 @@ sub ipset_copy_set { # copy members to new group my $tmpfile = "/tmp/set.$$"; system("ipset -S $set_name > $tmpfile"); - system("sed -i s/$set_name/$set_copy/g $tmpfile"); + system("sed -i \'s/ $set_name / $set_copy /g\' $tmpfile"); system("ipset -R < $tmpfile"); unlink $tmpfile; my $copy = new Vyatta::IpTables::IpSet($set_copy, $set_type); -- cgit v1.2.3