9150 Commits

Author SHA1 Message Date
Daniil Baturin
7c833ea3d6 Add a special case for /31 networks to openvpn_get_interface_ip() (another instance of #2529). 2018-07-14 19:50:59 +02:00
Ad Schellevis
15fa1eb0d4 plist 2018-07-14 17:13:26 +02:00
Ad Schellevis
9a5d641943 Firewall/alias, validate before removal for https://github.com/opnsense/core/issues/1858
Raise an exception when the alias seems to be used and avoid removal, keep behaviour like it was in the legacy code for now.
Eventually it would be better to replace all alias usage for uuids, but that would be too tricky to implement at once.
2018-07-14 17:06:50 +02:00
Ad Schellevis
8bc7c10d59 MVC, errorhandling, in some cases it's way easier to just raise an exception when an action may not be executed.
If you raise an exception now, it's always called an "API exception".

This commit adds a "UserException" type which lets the developer set a title for the message and passes this to the endpoint.
2018-07-14 16:46:40 +02:00
Franco Fichtner
91ed6de294 dhcp: remvoe excess whitespace 2018-07-14 14:13:13 +02:00
Franco Fichtner
063a425f27 firewall: IPv6 does not have network address restrictions; closes #2543 2018-07-14 10:49:19 +00:00
Franco Fichtner
e1b8871961 firewall: typo in previous 2018-07-14 12:03:11 +02:00
Franco Fichtner
80b9a81681 firewall: make NPTv6 aware of 6rd and 6to4; closes #2538 2018-07-14 10:00:29 +00:00
Franco Fichtner
3b8c5da4e2 rc: stf... stf everywhere 2018-07-14 11:32:43 +02:00
Franco Fichtner
cc2902e4dd interfaces: 6rd validation and avoid assignment #1501 2018-07-14 09:11:42 +00:00
Franco Fichtner
893e9cf0f4 dashboard: add a 6 columns option
5 doesn't work because bootstrap works on layouts based
on 12, so we can only have 1, 2, 3, 4, 6, 12...
2018-07-14 08:41:23 +00:00
Franco Fichtner
24f1d05c77 openvpn: p2p_tls is also used by client so treat all of it accordingly
PR: https://forum.opnsense.org/index.php?topic=9133.0
2018-07-12 11:45:27 +02:00
Franco Fichtner
69fef9cb9e openvpn: translate validated field names while at it #2536 2018-07-12 08:36:26 +02:00
Franco Fichtner
399d719ede openvpn: avoid accepting /32 "networks" where hosts are not allowed #2536
192.168.1.1/32 is not accepted, but 192.168.1.0/32 was.
2018-07-12 08:21:54 +02:00
Franco Fichtner
5a9d6773df firewall: whitespace alignments in new alias page 2018-07-12 08:04:00 +02:00
Ad Schellevis
aa215fcbdb Firewall/alias, ignore namelookup when no nameservers are configured
https://forum.opnsense.org/index.php?topic=9103.0
2018-07-12 07:03:09 +02:00
Franco Fichtner
a7846bdaba system: use priv-sep for remote backup 2018-07-11 14:24:34 +00:00
Franco Fichtner
9ca729b2c1 system: remote backup via cron
PR: https://forum.opnsense.org/index.php?topic=5763.0
2018-07-11 16:20:19 +02:00
Franco Fichtner
195cec19c4 system: do not use down / forced down for gateway switching
PR: https://forum.opnsense.org/index.php?topic=9115.0
2018-07-11 11:46:08 +02:00
Franco Fichtner
b8ff445601 firmware: ask for the right base/kernel in edge case
We already know a new kernel/base is there, but look up the old
one which may fail if it has been deleted.  This causes the sets
to be omitted from the update list, even though later on the
upgrade works as expected.
2018-07-11 07:40:09 +00:00
Franco Fichtner
a02f4a078f pkg: fix plist 2018-07-11 08:48:41 +02:00
Franco Fichtner
18569b5633 console: like setaddr.sh also reset DHCPv6 configuration 2018-07-11 08:47:20 +02:00
Ad Schellevis
01b62ca888 Firewall/alias, exit migration to prevent master branch becoming defunct 2018-07-10 20:38:59 +02:00
Franco Fichtner
c5f345334e ipsec: prettier label 2018-07-10 20:33:31 +02:00
Ad Schellevis
62878b3535 Firewall/alias, finish migration for https://github.com/opnsense/core/issues/1858 2018-07-10 20:31:00 +02:00
Ad Schellevis
3c0746d90b Firewall/alias, prefer mvc aliases in isAlias(), at the moment we need to keep scanning both (legacy,mvc) to make sure the migration can actually run. for https://github.com/opnsense/core/issues/1858 2018-07-10 20:29:37 +02:00
Ad Schellevis
409b8aac38 MVC, add post() action after model migration, in some cases it's not possible to drop the old config in the migration step, the new post() will be run after successful config sync 2018-07-10 20:11:33 +02:00
Ad Schellevis
76bad0d5cc IPsec, rename option, closes https://github.com/opnsense/core/issues/2531 2018-07-10 18:41:28 +02:00
Ad Schellevis
fada28880b Firewall/alias, fix validations using our new CallbackValidator type, for https://github.com/opnsense/core/issues/1858 2018-07-10 18:01:37 +02:00
Ad Schellevis
970140aa36 MVC/CallbackValidator, minor style cleanup 2018-07-10 16:10:59 +02:00
Ad Schellevis
ba5b127ee8 whitespace 2018-07-10 10:56:50 +02:00
Ad Schellevis
9bde30e6cb cleanup ApiMutableModelControllerBase, remove duplicate code and make sure all validation errors are returned to the client. (in stead of only the first) 2018-07-10 10:52:41 +02:00
Ad Schellevis
829c0a8f39 MVC, add simple callback validator which fits our framework. The standard Phalcon callback can only serve a complete list of known attributes in stead of the actual field pushed to our validator.
This implementation makes sure the callback is called with the actual field value and may return a list of validation errors.

Related to https://github.com/opnsense/core/issues/1858
2018-07-10 10:10:48 +02:00
Ad Schellevis
1b9db2bf7d whitespace 2018-07-10 09:11:30 +02:00
Ad Schellevis
82c869df89 IPSec, add pks+eap-tls scheme for https://github.com/opnsense/core/issues/2531 2018-07-10 09:10:01 +02:00
Ad Schellevis
5b9d4240c3 IPsec, attr.subnet seems to send the wrong networks to the client, align to phase2 entries, for https://github.com/opnsense/core/issues/2531 2018-07-09 22:47:07 +02:00
Fabian Franz
4b1dd4076a fix nextcloud file name format 2018-07-09 19:29:54 +02:00
Daniil Baturin
df338aef9c Add a special case for /31 tunnel networks to the OpenVPN config generator (fixes #2529). (#2530) 2018-07-09 18:30:30 +02:00
Franco Fichtner
0c1e39fdbe rc: cosmetics for account expiry 2018-07-09 08:56:27 +02:00
Franco Fichtner
497fe0ab95 pkg: fix plist 2018-07-09 08:51:37 +02:00
Ad Schellevis
f2b161e90d Firewall/alias, add migrations (work in progress), for https://github.com/opnsense/core/issues/1858 2018-07-08 20:24:53 +02:00
Ad Schellevis
2108ad2dc7 Firewall/alias, add missing proto field (for geoip), fix external selector. for https://github.com/opnsense/core/issues/1858 2018-07-08 20:24:06 +02:00
Franco Fichtner
c6034f651c interfaces: I don't know why but it makes more sense to me... #2521 2018-07-08 20:10:40 +02:00
Franco Fichtner
bc378402b5 interfaces: retain zapped prefix length calculation #2521 2018-07-08 20:04:25 +02:00
Ad Schellevis
2c206e2950 firewall/alias, drop 'detail' description field.
While working on https://github.com/opnsense/core/issues/1858 we decided to drop the detailed descriptions, since they won't fit into the new mvc version.

The new version will use a tokenizer to add alias entries, which makes it impossible to add labels on top of single items. When detailed descriptions are needed, we have support for alias nesting so single items can have descriptions. The current solution is hard to port, without the need of generating xml tags per item, which in many cases has quite some overhead.

The new alias code will likely enter in a 18.7.x release, since we don't want to drop support in a minor release, we've chosen to do so in the legacy code.

The format issue has been reported before in https://github.com/opnsense/core/issues/1110, for now we stick to using list types into single xml tags, since this is aligned with the other fieldtypes we use, and drop the impractical aligned descriptions.

As discussed with @fichtner
2018-07-08 19:12:16 +02:00
Franco Fichtner
25d9b62829 firewall: remove extraneous line break 2018-07-08 14:53:46 +02:00
Robin Schneider
3f86721ce3 Use openssh_enabled() in src/opnsense/scripts/shell/banner.php
This is only an improvement and unification of
`src/opnsense/scripts/shell/banner.php`.

Using `openssh_enabled()` both times in this file is preferred over one
time using `isset($config['system']['ssh']['enabled'])` and the other
time using `openssh_enabled()`.

Updates: 00f9b21cb78d9f76a8f94e8e62cbcefad65b7d99
Updates: 81e50abd0afba2d58ce487cdad60c7aedf899bbf
Updates: https://github.com/opnsense/core/pull/2481
2018-07-08 13:51:27 +02:00
Franco Fichtner
83f8321bce interfaces: allow /0 to /32 in 6rd #2521 2018-07-08 10:58:38 +00:00
Franco Fichtner
6df682c9dd interfaces: allow 6rd prefix 0 which is prefix 32 ? #2521 2018-07-08 10:35:21 +00:00
Ad Schellevis
ef127ed97c firewall/alias, minor style changes for https://github.com/opnsense/core/issues/1858
* make sure the tokenizer dropdown is hidden after pusing changes back
* show "X out of Y" under region selections
2018-07-08 12:06:11 +02:00