BUG11695: Adding/editing rules with preset broken

Message ID 1527164764-17533-1-git-send-email-alexander.marx@ipfire.org
State Rejected
Headers
Series BUG11695: Adding/editing rules with preset broken |

Commit Message

Alexander Marx May 24, 2018, 10:26 p.m. UTC
  added another check to fill same ports in source and destination when a custom service is selected.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Reported-by: erik@vanlinsteeict.nl
---
 html/cgi-bin/firewall.cgi | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Michael Tremer May 25, 2018, 12:47 a.m. UTC | #1
Hello,

what are we doing about systems that already have some value in the external
port setting?

-Michael

On Thu, 2018-05-24 at 14:26 +0200, Alexander Marx wrote:
> added another check to fill same ports in source and destination when a custom
> service is selected.
> 
> Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
> Reported-by: erik@vanlinsteeict.nl
> ---
>  html/cgi-bin/firewall.cgi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi
> index 499f279..d17afab 100644
> --- a/html/cgi-bin/firewall.cgi
> +++ b/html/cgi-bin/firewall.cgi
> @@ -757,6 +757,7 @@ sub checkrule
>  				}
>  			}
>  			if($fwdfwsettings{'nat'} eq 'dnat' &&
> $fwdfwsettings{'dnatport'} eq ''){$fwdfwsettings{'dnatport'}=$custsrvport;}
> +			if($fwdfwsettings{'nat'} eq 'dnat' &&
> $fwdfwsettings{'grp3'} eq
> 'cust_srv'){$fwdfwsettings{'dnatport'}=$custsrvport;}
>  		}
>  		#check if DNAT port is multiple
>  		if($fwdfwsettings{'nat'} eq 'dnat' &&
> $fwdfwsettings{'dnatport'} ne ''){
  
Stefan Schantl July 15, 2021, 4:07 p.m. UTC | #2
Hello List,

as already described in the bug entry on bugzilla
(https://bugzilla.ipfire.org/show_bug.cgi?id=11695) I'm unable to
reproduce the origin bug anymore.

As I discovered in the GIT history this patch never has been merged and
because the bug does not exist anymore this patch is not longer
required.

Best regards,

-Stefan
> added another check to fill same ports in source and destination when
> a custom service is selected.
> 
> Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
> Reported-by: erik@vanlinsteeict.nl
> ---
>  html/cgi-bin/firewall.cgi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi
> index 499f279..d17afab 100644
> --- a/html/cgi-bin/firewall.cgi
> +++ b/html/cgi-bin/firewall.cgi
> @@ -757,6 +757,7 @@ sub checkrule
>                                 }
>                         }
>                         if($fwdfwsettings{'nat'} eq 'dnat' &&
> $fwdfwsettings{'dnatport'} eq
> ''){$fwdfwsettings{'dnatport'}=$custsrvport;}
> +                       if($fwdfwsettings{'nat'} eq 'dnat' &&
> $fwdfwsettings{'grp3'} eq
> 'cust_srv'){$fwdfwsettings{'dnatport'}=$custsrvport;}
>                 }
>                 #check if DNAT port is multiple
>                 if($fwdfwsettings{'nat'} eq 'dnat' &&
> $fwdfwsettings{'dnatport'} ne ''){
  

Patch

diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi
index 499f279..d17afab 100644
--- a/html/cgi-bin/firewall.cgi
+++ b/html/cgi-bin/firewall.cgi
@@ -757,6 +757,7 @@  sub checkrule
 				}
 			}
 			if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'dnatport'} eq ''){$fwdfwsettings{'dnatport'}=$custsrvport;}
+			if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'grp3'} eq 'cust_srv'){$fwdfwsettings{'dnatport'}=$custsrvport;}
 		}
 		#check if DNAT port is multiple
 		if($fwdfwsettings{'nat'} eq 'dnat' && $fwdfwsettings{'dnatport'} ne ''){