BUG11466: fix routing.cgi the function call in routing.cgi was fixed to call the new "exact" function.

Message ID 1510063806-13883-1-git-send-email-alexander.marx@ipfire.org
State Dropped
Commit 51141b150d5fd2a51ae75f32fe23ce2eb79558e6
Headers
Series BUG11466: fix routing.cgi the function call in routing.cgi was fixed to call the new "exact" function. |

Commit Message

Alexander Marx Nov. 8, 2017, 1:10 a.m. UTC
  ---
 html/cgi-bin/routing.cgi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

ummeegge Nov. 15, 2017, 12:11 a.m. UTC | #1
Hi Alex,
wanted to give you a fast feedback that this do not work here. I a get an error message "This is the GREEN subnet" whereby it makes no difference which subnet i do enter. The following line

$errormessage .= &General::check_net_internal_range($settings{'IP'});

solves it currently.

Greetings,

Erik

Am 07.11.2017 um 15:10 schrieb Alexander Marx:

> ---
> html/cgi-bin/routing.cgi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi
> index 15989bd..f2014e2 100644
> --- a/html/cgi-bin/routing.cgi
> +++ b/html/cgi-bin/routing.cgi
> @@ -154,7 +154,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
> 			last;
> 		}
> 		#Is the network part of an internal network?
> -		$errormessage .= &General::check_net_internal($settings{'IP'});
> +		$errormessage .= &General::check_net_internal_exact($settings{'IP'});
> 		last;
> 	}
> 
> -- 
> 2.7.4
>
  
Michael Tremer Nov. 15, 2017, 12:15 a.m. UTC | #2
Hi,

this is only a part of the fix. The function itself was broken and you will need
to apply that patch, too. It is:

https://cgit.ipfire.org/ipfire-2.x.git/commit/?h=next&id=1047805dba564994a96da0adbfb6559a8609ec11

On Tue, 2017-11-14 at 14:11 +0100, ummeegge wrote:
> Hi Alex,
> wanted to give you a fast feedback that this do not work here. I a get an
> error message "This is the GREEN subnet" whereby it makes no difference which
> subnet i do enter. The following line
> 
> $errormessage .= &General::check_net_internal_range($settings{'IP'});

This function does not do what we actually want here. It gets rid of the error,
but does not allow to enter a subnet of any of the BLUE, GREEN or ORANGE
subnets.

Best,
-Michael

> 
> solves it currently.
> 
> Greetings,
> 
> Erik
> 
> Am 07.11.2017 um 15:10 schrieb Alexander Marx:
> 
> > ---
> > html/cgi-bin/routing.cgi | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi
> > index 15989bd..f2014e2 100644
> > --- a/html/cgi-bin/routing.cgi
> > +++ b/html/cgi-bin/routing.cgi
> > @@ -154,7 +154,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
> > 			last;
> > 		}
> > 		#Is the network part of an internal network?
> > -		$errormessage .=
> > &General::check_net_internal($settings{'IP'});
> > +		$errormessage .=
> > &General::check_net_internal_exact($settings{'IP'});
> > 		last;
> > 	}
> > 
> > -- 
> > 2.7.4
> > 
> 
>
  
ummeegge Nov. 15, 2017, 12:22 a.m. UTC | #3
Ah OK,
thanks for clarifying Michael.

Best,

Erik

Am 14.11.2017 um 14:15 schrieb Michael Tremer:

> Hi,
> 
> this is only a part of the fix. The function itself was broken and you will need
> to apply that patch, too. It is:
> 
> https://cgit.ipfire.org/ipfire-2.x.git/commit/?h=next&id=1047805dba564994a96da0adbfb6559a8609ec11
> 
> On Tue, 2017-11-14 at 14:11 +0100, ummeegge wrote:
>> Hi Alex,
>> wanted to give you a fast feedback that this do not work here. I a get an
>> error message "This is the GREEN subnet" whereby it makes no difference which
>> subnet i do enter. The following line
>> 
>> $errormessage .= &General::check_net_internal_range($settings{'IP'});
> 
> This function does not do what we actually want here. It gets rid of the error,
> but does not allow to enter a subnet of any of the BLUE, GREEN or ORANGE
> subnets.
> 
> Best,
> -Michael
> 
>> 
>> solves it currently.
>> 
>> Greetings,
>> 
>> Erik
>> 
>> Am 07.11.2017 um 15:10 schrieb Alexander Marx:
>> 
>>> ---
>>> html/cgi-bin/routing.cgi | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi
>>> index 15989bd..f2014e2 100644
>>> --- a/html/cgi-bin/routing.cgi
>>> +++ b/html/cgi-bin/routing.cgi
>>> @@ -154,7 +154,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
>>> 			last;
>>> 		}
>>> 		#Is the network part of an internal network?
>>> -		$errormessage .=
>>> &General::check_net_internal($settings{'IP'});
>>> +		$errormessage .=
>>> &General::check_net_internal_exact($settings{'IP'});
>>> 		last;
>>> 	}
>>> 
>>> -- 
>>> 2.7.4
>>> 
>>
  

Patch

diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi
index 15989bd..f2014e2 100644
--- a/html/cgi-bin/routing.cgi
+++ b/html/cgi-bin/routing.cgi
@@ -154,7 +154,7 @@  if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
 			last;
 		}
 		#Is the network part of an internal network?
-		$errormessage .= &General::check_net_internal($settings{'IP'});
+		$errormessage .= &General::check_net_internal_exact($settings{'IP'});
 		last;
 	}