public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: 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, 26 Apr 2018 18:03:28 +0100	[thread overview]
Message-ID: <1524762208.2479471.91.camel@ipfire.org> (raw)
In-Reply-To: <afc6319d-1bb8-84bf-d59a-ef4f5cacbb90@link38.eu>

[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]

Merged, but please don't do subject lines of that length again :)

On Thu, 2018-04-26 at 17:31 +0200, Peter Müller wrote:
> Slightly improved first version of this patch (contained
> a blank line with trailing whitespace). No functionality
> changed, patch has been confirmed as working correctly.
> 
> Fixes: #11312
> Signed-off-by: Peter Müller <peter.mueller(a)link38.eu>
> Signed-off-by: Alexander Marx <alexander.marx(a)ipfire.org>
> ---
>  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 a2ade8a20..10217425d 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'},$fwhost
> settings{'grp'},6);
> +			&changenameinfw($fwhostsettings{'oldgrpname'},$fwhost
> settings{'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);

      reply	other threads:[~2018-04-26 17:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 15:31 Peter Müller
2018-04-26 17:03 ` Michael Tremer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1524762208.2479471.91.camel@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox