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: [PATCH] BUG11825: firewall: Renaming a network/host group doesn't update rules
Date: Fri, 24 Aug 2018 11:46:06 +0100	[thread overview]
Message-ID: <1b56db782e38dc2aaaa007d58a1fb1009f69e72e.camel@ipfire.org> (raw)
In-Reply-To: <20180824080630.9612-1-alexander.marx@ipfire.org>

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

Perfect. Merged!

On Fri, 2018-08-24 at 10:06 +0200, Alexander Marx wrote:
> Code only changed field 6 of hash (target group) and not field 4 (source group).
> Also if using geoip it was only field 4 of hash (source group) and not field 6 of hash (target group)
> Added new code that changes both fields to reflect the change in the firewallrules immediately.
> 
> fixes: #11825
> 
> Signed-off-by: Alexander Marx <alexander.marx(a)ipfire.org>
> ---
>  html/cgi-bin/fwhosts.cgi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi
> index 576701ac6..7315e79b6 100644
> --- a/html/cgi-bin/fwhosts.cgi
> +++ b/html/cgi-bin/fwhosts.cgi
> @@ -1258,6 +1258,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegrpname')
>  			}
>  			&General::writehasharray("$configgrp", \%customgrp );
>  			#change name in FW Rules
> +			&changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4);
>  			&changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6);
>  		}
>  	}
> @@ -1282,6 +1283,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegeoipgrpname')
>  			&General::writehasharray("$configgeoipgrp", \%customgeoipgrp );
>  			#change name in FW Rules
>  			&changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4,"geoip");
> +			&changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6,"geoip");
>  		}
>  	}
>  	&addgeoipgrp;


      reply	other threads:[~2018-08-24 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24  8:06 Alexander Marx
2018-08-24 10:46 ` 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=1b56db782e38dc2aaaa007d58a1fb1009f69e72e.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