13867 Commits

Author SHA1 Message Date
Franco Fichtner
ca2f7b0ffa interfaces: DHCPv6 advanced has a different flag to disable NA #5332 2022-03-31 08:19:15 +02:00
Franco Fichtner
26a1b126c0 mvc: flipflip years to make more sense of moved functionality
Noticed on diff with stable/22.1.
2022-03-30 10:21:47 +02:00
Franco Fichtner
135d42fb7c src: style sweep 2022-03-30 10:01:52 +02:00
oittaa
5fd93bde41
Use random_bytes() from PHP 7.0+ and simplify the voucher generation (#5659)
* Use random_bytes() from PHP 7.0+
* Simplify voucher generation
2022-03-30 09:44:01 +02:00
oittaa
ec5f6877f5
Security : Use password_verify() (#5660) 2022-03-30 08:27:56 +02:00
Franco Fichtner
8e444c3b32 dhcp: give a hint on why an interface was ignored in radvd
PR: https://forum.opnsense.org/index.php?topic=26700.0
2022-03-29 13:16:39 +02:00
Franco Fichtner
4b6fa9e556 interfaces: different patch for ifctl use
Router file created by PPPoE as well?

PR: https://forum.opnsense.org/index.php?topic=27657.15
2022-03-29 10:15:39 +02:00
Franco Fichtner
aa64571116 system: more comments on get_nameservers() 2022-03-29 09:19:12 +02:00
Franco Fichtner
64fb551caa interfaces: add context to assignment label
Really not much to talk about at length.
2022-03-28 16:53:31 +02:00
Franco Fichtner
383561b6f1 system: simplify previous a bit
We can set gateway to null as it is ignored when setting host
route.  Also adhere to logic for interface selection in both
DNS modes, but only exclude from configuration list for dynamic
ones.

For the time being we don't need static/dymanic annotation
as the system doesn't care by design and we don't filter it
anywhere else.  Might be something for the status page, but
that's a larger change to level expectations vs. dyamic
connectivity properties.

A couple of style issues here and there as well.
2022-03-28 11:59:31 +02:00
Ad Schellevis
ccf826c065 theme / OPNsense - fix Dart deprecation warnings (DEPRECATION WARNING: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.) 2022-03-28 11:33:38 +02:00
Stephan de Wit
8d3584be16 get_nameservers(): also return manual dns entries to simplify code elsewhere 2022-03-28 09:25:25 +02:00
Franco Fichtner
57097e20ac interfaces: according to #5646 VIP reassignment enforces "order"
This is strange, but no the strangest thing to happen.  Partially
restore the old functionality but this time make sure we only
flip IPv4 on IPv4 and IPv6 on IPv6 changes instead of everything
all the time.
2022-03-28 09:22:23 +02:00
Ad Schellevis
2e747acda9 MVC - VPN / IPsec. Move array search method to more generic searchRecordsetBase() in ApiControllerBase, which is modelled similar to how searchBase() is implemented in ApiMutableModelControllerBase.
could help https://github.com/opnsense/core/pull/5465
2022-03-25 21:38:05 +01:00
Franco Fichtner
0d5d9f9ba9 firmware: exclude revision to match release during hotfixes 2022-03-25 15:13:48 +01:00
Franco Fichtner
79df42229b make: convenience target to test migrations 2022-03-25 07:45:29 +01:00
Ad Schellevis
364ec4782d MVC & VLan interfaces - properly select the root node for /vlans, // select "any" node within the sructure, which can point to items deeper in the structure than intended.
To limit the impact, make sure to only alter vlans now, eventually we should fix the other models as well as they are using // too (but are less likely to overlap)

(take 2)
2022-03-24 19:42:37 +01:00
Ad Schellevis
ad4715a9fc MVC & VLan interfaces - properly select the root node for /vlans, // select "any" node within the sructure, which can point to items deeper in the structure than intended.
To limit the impact, make sure to only alter vlans now, eventually we should fix the other models as well as they are using // too (but are less likely to overlap)
2022-03-24 17:14:18 +01:00
Ad Schellevis
fcbca64262 logging - fix for clear single log target keeps clog file, closes https://github.com/opnsense/core/issues/5644 2022-03-24 14:11:14 +01:00
Franco Fichtner
8db4f8c72d interfaces: little more style on previous 2022-03-24 08:37:48 +01:00
Ad Schellevis
d17e9c737d interfaces: zero prefix "vlan" and "qinq" interface names to prevent collisions on vlans.(https://github.com/opnsense/core/issues/5560)
Although the prepended 0 might look less intuitive it prevents overlaps when creating new vlans using "ifconfig vlan create" (2637e6ebca/src/etc/inc/interfaces.lib.inc (L77)), to keep qinq and vlan's consistent prepend on both types.

ref 2637e6ebca
2022-03-23 18:32:02 +01:00
Franco Fichtner
aa3c27df0b src: witespace sweep 2022-03-23 14:50:19 +01:00
Franco Fichtner
e0e7c7ee4c dhcp: remove dynamic IPv6 host name annotations that don't work in isc-dhcp 2022-03-23 12:38:00 +01:00
Stephan de Wit
b4adcee862
unbound: prefer system nameservers if forwarding is enabled and only run unbound-anchor when necessary (#5625) 2022-03-23 11:21:33 +01:00
Franco Fichtner
2637e6ebca interfaces: use consistent "vlan" or "qinq" prefix, start a 0 #5560
Since we also change the vlan names here for new devices to eventually
avoid overlong vlan interface names (#3222) we need to make sure the
rest of the system knows the new prefixes.

Some related style changes in code and text.
2022-03-23 08:54:02 +01:00
Franco Fichtner
4462747946 unbound: old behaviour says this or that 2022-03-22 14:59:39 +01:00
Franco Fichtner
0e4c3c6321 pkg: fix plist 2022-03-22 14:57:53 +01:00
Stephan de Wit
ef37f253df unbound: fix model description validation 2022-03-22 14:41:32 +01:00
Franco Fichtner
d7188a1ccd firmware: revoke 21.7 fingerprint 2022-03-22 13:54:31 +01:00
Franco Fichtner
bf3f7ddfa9 src: style sweep 2022-03-22 13:51:40 +01:00
Franco Fichtner
9dfafbc2ec src: lint pass 2022-03-22 13:40:28 +01:00
Stephan de Wit
6832fd75a0
unbound: implement custom forwarders over current dot setup (#5606)
This PR pulls query forwarding over the current dot setup, so visually nothing changes.

All API calls are redirected to new Forward functions, which slightly modifies what is returned based on whether "Query Forwarding" or "DNS over TLS" is selected from the menu. This way backwards compatibility is preserved.

As an addition, a user is now able to specify a specific domain for a forward zone as well. Meaning that queries for this specific domain will skip a catch-all (".") domain (if specified), and instead use the server specified for this domain.

Entering a forward zone with a catch-all domain (".") in both Query Forwading and DNS over TLS is considered a duplicate by Unbound, so a static warning for this has been attached in the grid - however, it might be possible for a user to be warned dynamically over this.
2022-03-22 13:38:26 +01:00
Franco Fichtner
5205dd9da7 make: create dir before mfc 2022-03-22 11:20:01 +01:00
Franco Fichtner
57017c07f8 src: style sweep 2022-03-22 08:07:44 +01:00
Franco Fichtner
20ae548f62 interfaces: more PPP changes for ifctl ##5565 2022-03-22 08:02:33 +01:00
Franco Fichtner
46fe3ac65d interfaces: easier to read/compare this way 2022-03-22 07:47:15 +01:00
Ad Schellevis
28e7d49380 configd - change error level for "unable to sendback response" messages as these aren't errors, just a reminder the client is too slow to wait for the answer. closes https://github.com/opnsense/core/issues/5639 2022-03-21 20:14:31 +01:00
Franco Fichtner
657265a410 interfaces: protect filter configure script #5637
Detach the OpenVPN filter reload a little so we make sure it only
executes once if the reconfigure all.  Not sure if these are strictly
neeeded but better to keep them now.
2022-03-21 11:07:55 +01:00
Franco Fichtner
9a0a4abe90 reporting: extract /var/run/booting use from RRD #5637
We can instruct the boot sequence to tell the function and lose the
need to check the flag.
2022-03-21 10:51:50 +01:00
Franco Fichtner
77594c8b99 firewall: route-to, reply-to (and dup-to) are mutally exclusive
PR: https://forum.opnsense.org/index.php?topic=26700.0
2022-03-21 10:19:16 +01:00
Franco Fichtner
61500f6790 interfaces: suspicious code is suspicious
I'm not sure why interface_bring_down() is needed when both
IPv4 and IPV6 are empty.  It sort of means "handle this the
hard way when doing tunnel configurations" althoug the code
disagrees about the historic comment and the code that was
introduced... "set to none" vs. "ipaddr <> none" and later
"empty(ipaddr)" to match the comment.  In the grand scheme of
things this does not matter at all...

So in 22.1.3 we removed the inline configuration of GIF and GRE
which causes interface configuration to strip the addresses
added by device configuration instead of refixing it on the
fly (executing code twice all the time).  The code flow was
always correct but in practice tripping over itself so now try
a more sensible approach by stripping addresses when we have
assignments going on individually for IPv4 and IPv6.

PR: https://forum.opnsense.org/index.php?topic=27553.0
2022-03-21 09:34:34 +01:00
Franco Fichtner
f58789d1e8 interfaces: log the reload hook
Under normal circumstances a tunnel that is assigned to an
interface will be restarted when said interface becimes
available.  This is to fix the previous load of the device
when the actual interface wasn't yet ready.
2022-03-21 08:40:30 +01:00
Franco Fichtner
9a618ba689 interfaces: loopback "lo0" exists for VIPs
Historic oversight of wedging in a loopback interface in virtual IP
section while not making sure the actual configuration receives a
virtual IP when it needs to.  This was previously fixed by a batch
VIP regeneration in interfaces_configure() but we already saw that
this is not needed in 99% of the cases.

PR: https://forum.opnsense.org/index.php?topic=27547.0
2022-03-19 20:10:41 +01:00
Ad Schellevis
0ac674ceac Firewall - Aliases : tighten fqdn validation to avoid mistypes as 192.168.01.1 from being accepted as domain name. 2022-03-18 17:26:21 +01:00
Franco Fichtner
56bd1c33c2 interfaces: add manual page for ifctl; closes #5631 2022-03-18 09:28:44 +01:00
Franco Fichtner
cea2768c71 system: document configctl in a manual page #5631 2022-03-18 09:00:17 +01:00
Franco Fichtner
96039560ad interfaces: detach newwanip call as discussed 2022-03-18 08:28:04 +01:00
Franco Fichtner
975b38c065 system: shorten markers, drop "growfs" suffix 2022-03-17 07:58:19 +01:00
Ad Schellevis
64227e7cb0 newwanipv6 - revert ipv6 from 8c49c7bfdd as discussed 2022-03-16 21:23:59 +01:00
Ad Schellevis
797c186419 dhclient-script: prevent the removal of default routes as rc.newwanip is responsible for calculating the correct active default.
Ideally rc.newwanip should be as lightweight as possible, with 8c49c7bfdd in place normal execution doesn't take much time, but it likely doesn't make sense to hook gif|gre interfaces either when nothing has changed.

closes https://github.com/opnsense/core/issues/5624
2022-03-16 20:44:37 +01:00