9910 Commits

Author SHA1 Message Date
Ad Schellevis
a7ddcb6e3c Routing, gateways. ditch return_gateways_array() usage in system_gateway_groups.php, system_gateway_groups_edit.php for https://github.com/opnsense/core/issues/2279 2019-04-11 13:21:15 +02:00
Ad Schellevis
65facfb695 Routing, gateways. kill fixup_default_gateway() and replace with new logic from Gateways() class, remove gw_switch_group[4|6] while at it. for https://github.com/opnsense/core/issues/2279 2019-04-11 13:10:12 +02:00
Ad Schellevis
b64af8fe49 Routing, gateways. change priority order as discussed in https://github.com/opnsense/core/issues/2279 2019-04-11 13:06:32 +02:00
Ad Schellevis
64db6b5acb Routing, gateways. extend sort key generation to prefer "default wan", which also eases default gateway selection. for https://github.com/opnsense/core/issues/2279 2019-04-11 11:16:55 +02:00
Ad Schellevis
40dd845d36 Routing, pass \OPNsense\Routing\Gateways object to Firewall plugin system, ditches another return_gateways_array() caller and provides the possibility to access the gateways from the firewall. for https://github.com/opnsense/core/issues/2279 2019-04-11 10:21:18 +02:00
Ad Schellevis
b7ce18e24d Gateways, move setIfconfig to constructor, since its required for proper use anyway. for https://github.com/opnsense/core/issues/2279 2019-04-11 09:50:24 +02:00
Ad Schellevis
dde1180b51 routing, gateways. add function to return "down" gateways and remove now unused validate_address_family(), for https://github.com/opnsense/core/issues/2279 2019-04-10 18:05:57 +02:00
Ad Schellevis
e40b64d5ba routing, gateways. use new gateway class in edit page and add priority field. for https://github.com/opnsense/core/issues/2279 2019-04-10 18:04:27 +02:00
Ad Schellevis
1ba31b992b routing, gateways, use new class in system_gateways.php. remove weird friendlyiface behaviour while there. for https://github.com/opnsense/core/issues/2279 2019-04-10 18:03:06 +02:00
Ad Schellevis
34514fa454 routing, gateways. hook new gateway list into system_general.php for https://github.com/opnsense/core/issues/2279 2019-04-10 18:01:54 +02:00
Ad Schellevis
da5f3cb175 Routing, gateways. more work on gateway priorities for https://github.com/opnsense/core/issues/2279
- getGateways() is cached now and returns an ordered list of gateways, highest priority first
- getDefaultGW() returns the default gateway for the selected ipproto, excluding a list of down gateways. when no default is found, other gateways ordered by priority are considered
- gatewaysIndexedByName() is a drop in replacement for return_gateways_array()
2019-04-10 17:55:23 +02:00
Ad Schellevis
0dddfd14cd missed a spot in previous, for https://github.com/opnsense/core/issues/2279 2019-04-10 17:49:29 +02:00
Ad Schellevis
1f6aac10a4 filter, edit rule. ditch validate_address_family(), cleanups for https://github.com/opnsense/core/issues/2279 2019-04-10 17:43:16 +02:00
Franco Fichtner
d6324fc822 interfaces: keep get_failover_interface() for now, mixed plugins env possible 2019-04-10 08:13:34 +02:00
Franco Fichtner
241716e8a7 system: sometimes there are MS line breaks in here 2019-04-10 08:09:54 +02:00
Franco Fichtner
608a563710 firewall: missing newline 2019-04-10 07:49:13 +02:00
Franco Fichtner
303b169b52 Revert "system: another count() error, pretty silly"
This reverts commit 5791e9713baacf304894995afb94cff67807f94e.
Two times the fix.  Other one looks better.
2019-04-10 07:42:54 +02:00
Ad Schellevis
00b46e0575 configd, idna encode, orginating from https://github.com/opnsense/core/pull/3107 and other commits from the same contributor.
Fix for https://github.com/opnsense/core/pull/3107, although I'm doubting if we should keep supporting idna, since fixing these issues often cost us quite some time and demand for the feature doesn't appear to be very high.
2019-04-09 20:52:19 +02:00
Ad Schellevis
d2a14f7fba gateways, reimplement into new class (https://github.com/opnsense/core/issues/2279)
Its work in progress, but the basic idea is to make sure we can easily output a list of all gateways (ipv4+ipv6) in the system, which is always correctly ordered by priority.
As soon as this works, we should be able to propogate ipprotocol to the gateway groups as well and easily iterate over the list to deterimine which gateways should be used at any time.

When settings are available in gateways->gateway_item, they should logically precede the ones generated dynamically.
2019-04-09 18:41:53 +02:00
Ad Schellevis
172f746e15 ditch get_failover_interface() while working on https://github.com/opnsense/core/issues/2279 2019-04-09 15:43:36 +02:00
Ad Schellevis
c9e6532d01 ditch get_failover_interface() usage in openvpn.inc, loosly related to https://github.com/opnsense/core/issues/2279 2019-04-09 15:21:57 +02:00
Ad Schellevis
92ef6f354c gateway related cleanups, since openvpn can't have a gateway group as interface, this can't happen as well. https://github.com/opnsense/core/issues/2279 2019-04-09 15:14:08 +02:00
Ad Schellevis
09a7d8aef6 gateway related cleanups, unused return_gateway_groups_array() usage, related to https://github.com/opnsense/core/issues/2279 2019-04-09 15:11:45 +02:00
Ad Schellevis
0015ec92ab gateway related cleanups, it must be my lucky day, since we killed get_failover_interface() in ipsec_get_phase1_src() a long time ago, there's no way this can do anythging useful. related to https://github.com/opnsense/core/issues/2279 2019-04-09 15:08:15 +02:00
Ad Schellevis
faa0a356c9 more gateway related cleanups, luckily this can't happen as well group->ipprotocol doesn't exist. for https://github.com/opnsense/core/issues/2279 2019-04-09 15:01:20 +02:00
Ad Schellevis
607dbfbd8f cleanup gateway code before actually changing things in https://github.com/opnsense/core/issues/2279
Luckily it wasn't really possible to select a gateway group in openvpn at our end, since interfaces and gatewaygroups are really different things.
We need to unravel some of this weirdness first, so we can start reimplementing the gateway code as it is now.
2019-04-09 14:56:04 +02:00
Ad Schellevis
75f74d83a9 php7.2, some more issues waiting to happen. closes https://github.com/opnsense/core/issues/3400 2019-04-09 14:06:31 +02:00
Ad Schellevis
f70fe3c1ad php7.2, in_array() parameter issue in services_dnsmasq.php for https://github.com/opnsense/core/issues/3400 2019-04-09 13:57:47 +02:00
Ad Schellevis
fa33d80ada php7.2, count() issues in wizard template, for https://github.com/opnsense/core/issues/3400 2019-04-09 13:54:13 +02:00
Ad Schellevis
86235b9a0e php7.2, unused var triggering count() issue in interfaces_ppps_edit.php for https://github.com/opnsense/core/issues/3400 2019-04-09 13:46:42 +02:00
Ad Schellevis
2765517ac7 php7.2, count() issue in www/guiconfig.inc for https://github.com/opnsense/core/issues/3400 2019-04-09 13:43:55 +02:00
Ad Schellevis
4772e0c5db php7.2, count() issue in www/firewall_schedule_edit.php for https://github.com/opnsense/core/issues/3400 2019-04-09 13:39:54 +02:00
Ad Schellevis
a0264aaa85 php7.2, count() issue in www/diag_dns.php for https://github.com/opnsense/core/issues/3400 2019-04-09 13:38:27 +02:00
Ad Schellevis
fba5738048 php7.2, fix some count() issues in inc/plugins.inc.d/openvpn/wizard.inc for https://github.com/opnsense/core/issues/3400 2019-04-09 13:26:23 +02:00
Franco Fichtner
3d46287880 system: better mute if not there already 2019-04-09 12:15:02 +02:00
Franco Fichtner
59b913f9e5 system: cleanly rewrite CA root files, add our own; closes #1460 2019-04-09 10:13:12 +00:00
Ad Schellevis
507421fe86 www/system_gateways.php fix some php warnings for https://github.com/opnsense/core/issues/3400 2019-04-09 11:50:15 +02:00
Ad Schellevis
d082d266c9 widgets/api/plugins/system.inc some php warnings, for https://github.com/opnsense/core/issues/3400 2019-04-09 11:42:48 +02:00
Franco Fichtner
8bc683d295 system: typo in previous 2019-04-09 08:19:14 +02:00
Franco Fichtner
cedd87763b dashboard: only accept post from dashboard
Login form resubmit would not login but rather post to dashboard
which leaves all settings empty.

PR: https://forum.opnsense.org/index.php?topic=12328.0
2019-04-09 08:11:46 +02:00
Franco Fichtner
5791e9713b system: another count() error, pretty silly
https://forum.opnsense.org/index.php?topic=12298.0
2019-04-09 08:02:49 +02:00
Franco Fichtner
a0f234f761 src: style and whitespace sweep 2019-04-09 07:48:04 +02:00
Franco Fichtner
208a743b8f openvpn: if we don't need count then !empty works the same way 2019-04-09 07:34:29 +02:00
Ad Schellevis
225e304ace Revert "webui login, reload page to prevent csrf token invalidation. just a simple test for something discussed with @fichtner, might be reverted later if deemed impractical."
This reverts commit c22ebec1a9ff83eaaf3d39e7aebe9a823d096f8d.
2019-04-08 21:41:21 +02:00
Franco Fichtner
a0bab7871a intrusion detection: header style while here 2019-04-08 21:36:50 +02:00
Ad Schellevis
63be476681 IDS, try to fix some possible php7.2 issues with count()
While inspecting https://forum.opnsense.org/index.php?topic=12352.0 it seems quite unlikely that $result has a key called rows, which isn't an array, since queryInstalledRules.py can only return arrays.
Since I can't reproduce the issue on my end and it looks like either a bug in array_key_exists() or count(), lets try to avoid count() a bit.
2019-04-08 21:30:47 +02:00
Ad Schellevis
c22ebec1a9 webui login, reload page to prevent csrf token invalidation. just a simple test for something discussed with @fichtner, might be reverted later if deemed impractical. 2019-04-08 17:49:35 +02:00
Ad Schellevis
92f5c81100 bootstrap, fix regression in https://github.com/opnsense/core/issues/3377
- sidebar navigation button hidden, ignoring display atribute
2019-04-08 17:24:53 +02:00
Ad Schellevis
834f0e12b9 bootrstrap, login font back to normal (https://github.com/opnsense/core/issues/3377) 2019-04-08 10:55:19 +02:00
Ad Schellevis
c24b45f17f bootstrap, missing _reset-text.scss (https://github.com/opnsense/core/issues/3377) 2019-04-08 10:54:05 +02:00