[1/2] wio.pl: Fix bug 12799 - Remove code scanning for all potential IP's on RED interface

Message ID 20220413080020.3664760-1-adolf.belka@ipfire.org
State Accepted
Commit 12fbbc61e568b208f007df3b02c28b0bb6fe14e7
Headers
Series [1/2] wio.pl: Fix bug 12799 - Remove code scanning for all potential IP's on RED interface |

Commit Message

Adolf Belka April 13, 2022, 8 a.m. UTC
  - The lines to scan the red interface were introduced at the time of a patch to remove
   the IPFire start/stop function from wio. These lines are not related to that change
   but were included in the patch with no commit message. The same lines were also added
   into wio.cgi in the same patch set but in that case the lines were all commented out.
- These lines look like they were most likely added to the code for investigation or
   debugging purposes. Looking at the lines in wio.pl the results obtained are not
   used elsewhere in wio for obtaining info on the status of the red interface. Deleting
   the lines did not affect anything related to the scanning, setup or monitoring of
   systems by wio.
- The lines were wasting space but generally not creating a huge impact on pertformance.
   On my production system it scans my red and comes up with a list of 1022 IP's because
   of the subnet my ISP uses - xxx.yy.216.0/20
- Scanning those 1022 IP's and sorting them takes my system about 3 seconds. Without
   sorting it is around the same level.
- In Bug#12799 the originator has an ISP that is using a private network that has a
   defined subnet of 10.0.0.0/8 This is 16,777,214 IP's to be scanned. Even without sorting
   my system would end up taking around 13 hours to do that. The bug originator found that
   on certain machines that he had IPFire on wio just never stopped scanning.
- As these lines just seem to collect a large amount of IP's on red that are not related
   to the actual running red IP, as there was no commit message related to their
   introduction and as removing the lines on vm's running dhcp and static red interfaces
   and also on my running production system for 4 weeks has shown no impact on the
   monitoring capability this patch is being submitted to remove these lines from wio

Fixes: Bug#12799
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 src/wio/main/wio.pl | 3 ---
 1 file changed, 3 deletions(-)
  

Comments

Bernhard Bitsch April 13, 2022, 8:55 a.m. UTC | #1
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>

Am 13.04.2022 um 10:00 schrieb Adolf Belka:
> - The lines to scan the red interface were introduced at the time of a patch to remove
>     the IPFire start/stop function from wio. These lines are not related to that change
>     but were included in the patch with no commit message. The same lines were also added
>     into wio.cgi in the same patch set but in that case the lines were all commented out.
> - These lines look like they were most likely added to the code for investigation or
>     debugging purposes. Looking at the lines in wio.pl the results obtained are not
>     used elsewhere in wio for obtaining info on the status of the red interface. Deleting
>     the lines did not affect anything related to the scanning, setup or monitoring of
>     systems by wio.
> - The lines were wasting space but generally not creating a huge impact on pertformance.
>     On my production system it scans my red and comes up with a list of 1022 IP's because
>     of the subnet my ISP uses - xxx.yy.216.0/20
> - Scanning those 1022 IP's and sorting them takes my system about 3 seconds. Without
>     sorting it is around the same level.
> - In Bug#12799 the originator has an ISP that is using a private network that has a
>     defined subnet of 10.0.0.0/8 This is 16,777,214 IP's to be scanned. Even without sorting
>     my system would end up taking around 13 hours to do that. The bug originator found that
>     on certain machines that he had IPFire on wio just never stopped scanning.
> - As these lines just seem to collect a large amount of IP's on red that are not related
>     to the actual running red IP, as there was no commit message related to their
>     introduction and as removing the lines on vm's running dhcp and static red interfaces
>     and also on my running production system for 4 weeks has shown no impact on the
>     monitoring capability this patch is being submitted to remove these lines from wio
> 
> Fixes: Bug#12799
> Tested-by: Adolf Belka <adolf.belka@ipfire.org>
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
>   src/wio/main/wio.pl | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/src/wio/main/wio.pl b/src/wio/main/wio.pl
> index 91c6c1494..78c91eeb9 100644
> --- a/src/wio/main/wio.pl
> +++ b/src/wio/main/wio.pl
> @@ -98,9 +98,6 @@ my ( $ping_i, $ping_t, $ping_ib, $ping_tb, $ping_iv, $ping_tv, $pingmode ) = '';
>   my ( @tmp, @arptmp, @myarray, @status, @arpclients ) = '';
>   my @ifaces = ('GREEN','BLUE','ORANGE');
>   
> -if ( $netsettings{'RED_TYPE'} eq 'STATIC' || $netsettings{'RED_TYPE'} eq 'DHCP' ) {
> -	push (@ifaces, "RED");
> -}
>   
>   if ( $mailsettings{'USEMAIL'} eq 'on' ) { $mailen = 'on'; }
>   else { $mailen = 'off'; }
  

Patch

diff --git a/src/wio/main/wio.pl b/src/wio/main/wio.pl
index 91c6c1494..78c91eeb9 100644
--- a/src/wio/main/wio.pl
+++ b/src/wio/main/wio.pl
@@ -98,9 +98,6 @@  my ( $ping_i, $ping_t, $ping_ib, $ping_tb, $ping_iv, $ping_tv, $pingmode ) = '';
 my ( @tmp, @arptmp, @myarray, @status, @arpclients ) = '';
 my @ifaces = ('GREEN','BLUE','ORANGE');
 
-if ( $netsettings{'RED_TYPE'} eq 'STATIC' || $netsettings{'RED_TYPE'} eq 'DHCP' ) {
-	push (@ifaces, "RED");
-}
 
 if ( $mailsettings{'USEMAIL'} eq 'on' ) { $mailen = 'on'; }
 else { $mailen = 'off'; }