Bug 11466 - static routes unusable because of missing function in general-functions.pl
Summary: static routes unusable because of missing function in general-functions.pl
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: Will affect most users Crash
Assignee: Alexander Marx
QA Contact: Michael Tremer
URL:
Keywords:
: 11483 11533 (view as bug list)
Depends on:
Blocks: 11278
  Show dependency treegraph
 
Reported: 2017-08-17 12:46 UTC by Michael Tremer
Modified: 2018-01-10 17:41 UTC (History)
8 users (show)

See Also:


Attachments
Suggested patch for 'general-functions.pl' (3.51 KB, patch)
2017-10-10 19:19 UTC, Matthias Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
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.