From patchwork Thu Apr 5 16:36:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Marx X-Patchwork-Id: 1718 Return-Path: Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id 87D4060748 for ; Thu, 5 Apr 2018 08:36:45 +0200 (CEST) X-Virus-Scanned: ClamAV at mail01.ipfire.org X-Spam-Flag: NO X-Spam-Score: -1.1 X-Spam-Level: X-Spam-Status: No, score=-1.1 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] autolearn=disabled Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id A2725108B8BD; Thu, 5 Apr 2018 07:36:43 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ipfire.org; s=201801; t=1522910204; x=1525502204; bh=m97tKZbgo8/cdBN4OkoYERfsgyeQOfh67992KDC0kQw=; h=From:To:Subject:Date:Message-Id:Sender:From:To:Cc:Date: Content-Type:Message-ID:In-Reply-To:Subject:Reply-To:Sender; b=Im9nWMsd0GiJwDGk754GMHFmw7D4eH3s+d9nyd66vLjBJKzH9rGGiIISZSoaXz5te HEQCG5qOY4nXPC8dLms6ecSP5t9tqZZsxrtMpQcAgJzDKPXONTIFo/PDyk8XutPpro Rpz3jJwBpWEP9lKoRuEvMGQMfbqWr0ADKuCKF2tLKtoskj2guqk2ePasEf+q73JXtK HiSdmJswvE9rZmF/HuI2jLOHnWZwxHgkNcMW00GPayZ0CMc0zXGrRG959CrXj6jadY OwunxsF+rcbcjt9FIxepSmntxLEX51+Z80Wf7cgap8ip48gC8aLzG2VEfWAzGKS3sz r9ONtKqqzBc8Q== X-Virus-Scanned: ClamAV at mail01.ipfire.org Received: from localhost.localdomain (business-90-187-3-157.pool2.vodafone-ip.de [90.187.3.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 6132E108B8B5; Thu, 5 Apr 2018 07:36:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ipfire.org; s=201801; t=1522910199; x=1525502199; bh=m97tKZbgo8/cdBN4OkoYERfsgyeQOfh67992KDC0kQw=; h=From:To:Cc:Subject:Date:Message-Id:From:To:Cc:Date:Content-Type: Message-ID:In-Reply-To:Subject:Reply-To:Sender; b=v61T2r3m98FidbK50fKMrIP106lhkX09E2EKY5bqdA5RHiX8XtdXV3XHqWGGMLFY/ m6g3H//tfVaIgWfQ+kMrTi4NKRdggayywBzBNF8U++0Ph+r1lhn8kFSaVs115N+WkX b5UnxEd75f0mMD+9nQKbATG32HTq3oKQzcrAchxI2TfD1hzf0N2ypo8glSLmeXoZp2 fhX0j3FkrEOZixRYXBjsrM0yF0Rw5FOaJIh27wvxwvTnqC1BjUZXHhccsJDUq41ecK 519Zq9wngfliJwXUdN8B+46Xg+5qEd65DP+yFbRfNt+I/tmiYY1ORe57CYBk5BpbZ2 fJqLJRgiDvO1g== From: Alexander Marx To: development@lists.ipfire.org Subject: [PATCH] BUG:11312 When renaming a GeoIP Group, the corresponding names in firewallrules (if any) are not changed accordingly. Now when changing a GeoIP Group the firewallrules are renamed correctly. Date: Thu, 5 Apr 2018 08:36:36 +0200 Message-Id: <1522910196-7951-1-git-send-email-alexander.marx@ipfire.org> X-Mailer: git-send-email 2.7.4 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" fixes: #11312 --- html/cgi-bin/fwhosts.cgi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index a2ade8a..c342d46 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1278,7 +1278,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegeoipgrpname') } &General::writehasharray("$configgeoipgrp", \%customgeoipgrp ); #change name in FW Rules - &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6); + &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4,"geoip"); } } &addgeoipgrp; @@ -3052,6 +3052,12 @@ sub changenameinfw my $old=shift; my $new=shift; my $fld=shift; + my $type=shift; + + if ($type eq 'geoip'){ + $old="group:$old"; + $new="group:$new"; + } &General::readhasharray("$fwconfigfwd", \%fwfwd); &General::readhasharray("$fwconfiginp", \%fwinp); &General::readhasharray("$fwconfigout", \%fwout);