Bug 11466

Summary: static routes unusable because of missing function in general-functions.pl
Product: IPFire Reporter: Michael Tremer <michael.tremer>
Component: ---Assignee: Alexander Marx <alexander.marx>
Status: CLOSED FIXED QA Contact: Michael Tremer <michael.tremer>
Severity: Crash    
Priority: Will affect most users CC: amarx, arne.fitzenreiter, horace.michael, matthias.fischer, mlorenz, morlix, peter.mueller, robert
Version: 2   
Hardware: unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 11278    
Attachments: Suggested patch for 'general-functions.pl'

Description Michael Tremer 2017-08-17 12:46:40 UTC
> [Thu Aug 17 03:43:41 2017] [error] [client 80.X.X.X] Undefined subroutine &General::check_net_internal called at /srv/web/ipfire/cgi-bin/routing.cgi line 157., referer: https://X.X.X.X:444/cgi-bin/routing.cgi

This function has been removed in http://cgit.ipfire.org/ipfire-2.x.git/commit/config/cfgroot/general-functions.pl?id=b7ab17ad83877436f13215cc850e993ade0cb846 and routing.cgi has not been updated accordingly.
Comment 1 Peter Müller 2017-08-30 20:45:26 UTC
*** Bug 11483 has been marked as a duplicate of this bug. ***
Comment 2 Michael Tremer 2017-10-10 13:38:53 UTC
@Alex: Could you please have an urgent look at this?
Comment 3 Matthias Fischer 2017-10-10 19:19:25 UTC
Created attachment 536 [details]
Suggested patch for 'general-functions.pl'
Comment 4 Matthias Fischer 2017-10-10 19:22:59 UTC
Hi,
[the first comment for the above patch got somehow lost, sorry]

I tried reverting 'general-functions.pl' as it worked in Core 108.

Result:
I can add more than two static routes.
I can add '/24'-subnets in "Firewall Firewall Groups".

HTH,
Matthias
Comment 5 Alexander Marx 2017-10-12 07:49:25 UTC
in routing.cgi there is a function called which is no longer existent.

The 1 million $ question:

We are able to check the internal networks for a range or exactly. So its a bit difficult to decide which check we should start here.

Michael please give your opinion. 

Should we check for the EXACT subnet or for the RANGE at this point? 
in my opinion we should use the exact check here as we are able to route subnets of the internal networks too.

Thank you
Comment 6 Michael Tremer 2017-10-25 10:35:19 UTC
(In reply to Alexander Marx from comment #5)
> We are able to check the internal networks for a range or exactly. So its a
> bit difficult to decide which check we should start here.

I think we should check for *exactly* the green/blue/orange subnet because it does not make sense and is probably a user error to set up a route like that.

I think we should allow to reroute half a green subnet for example if the user wishes to do so.
Comment 7 Timo Eissler 2017-11-01 20:49:16 UTC
Is there a progress on this?

It is annoying not being able to edit or add static routing entries.

Kind regards,

Timo
Comment 8 Michael Tremer 2017-11-06 19:21:35 UTC
*** Bug 11533 has been marked as a duplicate of this bug. ***
Comment 9 Rob Peterson 2017-11-06 22:17:20 UTC
I have already changed the routing.cgi as noted in 11533 so that I could add multiple static routes.  Can I still install the proposed patch or do I need to change the routing.cgi back to the original and install this patch?

Background:

IPFire runs on VLAN with several other subnets (VLAN10, 20, 100) switching to VLAN255 via a Cisco router.  Our server crashed and rebuilt IPFire on an alternate box but couldn't add a route and so I was starting to prepare to switch firewalls when I found solution 11533..

I also encountered the problem in the firewall but didn't realize that they were related until 11533 was closed. I found that although I couldn't create a network group, I could still specific a network range in the firewall so that is how my firewall is currently configured.