13457 Commits

Author SHA1 Message Date
Franco Fichtner
cc0b1b3be9 interfaces: move searchdomain files to /tmp #5367 2021-11-28 13:25:37 +01:00
Franco Fichtner
713e2469cb interfaces: move "cache" file to /tmp and rename for clarity #5367
Not sure about the name but since we move it we might as well
try to make the name more descriptive.  In /tmp we don't have
to clear stuff on bootup.
2021-11-28 13:15:42 +01:00
Franco Fichtner
ec3f62840a interfaces: wait a second, if $ip_file is never read remove it #5367
Stranger things have happened...
2021-11-27 13:56:09 +01:00
Franco Fichtner
49210b3da8 interfaces: rc.newwanip(v6) changes related to #5367
o Only operate the /var/db IP files via rc.newwanip(v6)
o Consistenly flush a cache IP on a triggered reload
o Remove IPv6 address removal workaround from https://redmine.pfsense.org/issues/2627
o Assume that IP is properly checked making $cacheip != $ip a valid assumption when $cacheip is empty
o Remove creation from dhclient script
2021-11-27 13:54:06 +01:00
Franco Fichtner
aa6ffc501d interfaces: these ip files under /tmp are not being used #5367 2021-11-27 13:21:57 +01:00
Franco Fichtner
63f92e9d4c interfaces: remove code that appears uncessary
States are not bound to routers and -i combo doesn't seem to
work very well either.
2021-11-26 12:35:52 +01:00
Franco Fichtner
bc0f921113 Revert "interfaces: use same approach as ppp-linkup script #5367"
This reverts commit a8522b7243e6b0fe76c91ccf52a9128d5fa9d0f6.
2021-11-26 12:12:21 +01:00
Franco Fichtner
a8522b7243 interfaces: use same approach as ppp-linkup script #5367 2021-11-26 10:27:35 +01:00
Franco Fichtner
cc76580b16 pkg: fix plist 2021-11-24 22:33:55 +01:00
Ad Schellevis
2cfd70b7eb System: High Availability - optionally disconnect dailup interfaces when going into CARP backup mode. while here reformat the HA section a bit as state sync is only part of the options. closes https://github.com/opnsense/core/issues/3185 2021-11-24 20:05:46 +01:00
Franco Fichtner
ef551570e8 src: spacing on html inputs 2021-11-24 12:47:03 +01:00
Franco Fichtner
319ad1cac2 system: cron template whitespace adjustments 2021-11-24 10:27:16 +01:00
Ad Schellevis
e6f9b9a388 Interfaces - remove validation preventing an interface to be enabled when aliases are already assigned (introduced in 62a4abc92c), there doesn't seem to be a valid reason for requiring no aliases 2021-11-23 19:20:08 +01:00
Franco Fichtner
767d814636 interfaces: on a device node there is no parent to use
Seems to have been in the code for a while.  dhcp6usev4iface should
have probably been the default all along since otherwise this seeps
into the default mode on IPv6 causing it to fail.
2021-11-23 16:18:14 +01:00
Franco Fichtner
8250ad50c3 Revert "pkg: suricata is now the same as suricata-devel"
This reverts commit d29b652cc01186b6b8d05aac998cfe3053bfb4af.

pkg-upgrade ignores this and upgrading the core package which
is suboptimal at the very least.
2021-11-23 15:25:47 +01:00
Franco Fichtner
62e9191ad2 interfaces: style sweep 2021-11-23 13:58:37 +01:00
Franco Fichtner
028302ae74 interfaces: avoid touching cacheip files and improve state kill #5367 2021-11-23 13:13:25 +01:00
Franco Fichtner
671ebddbe9 system: escape opportunistic matchig to provide the fallback always
PR: https://forum.opnsense.org/index.php?topic=25599.0
2021-11-23 13:04:46 +01:00
Franco Fichtner
6f052c3cbd system: on IPv4 monitor fallback use the full lookup
PR: https://forum.opnsense.org/index.php?topic=25599.0
2021-11-23 12:56:32 +01:00
Franco Fichtner
7ada19dd4c interfaces: deal with PPP device nodes
Some mwexecf() sanity on the side and notes for further work.

PR: https://forum.opnsense.org/index.php?topic=25599.0
2021-11-23 11:14:31 +01:00
Franco Fichtner
19d89e0fd9 system: add a tiny manual page for opnsense-log 2021-11-23 09:20:40 +01:00
Franco Fichtner
0b75c0c0a8 interfaces: simplify get_parent_interface() 2021-11-23 08:47:14 +01:00
Franco Fichtner
63408df158 system: improve opnsense-log a little 2021-11-23 08:30:00 +01:00
Franco Fichtner
9c122803be interfaces: flatten the call stack and unify logging 2021-11-23 08:14:18 +01:00
Franco Fichtner
4b44917198 LICENSE: sync after discussion with author 2021-11-22 15:13:50 +01:00
Franco Fichtner
7ee755df75 interfaces: bring back old name from c30477bef708fa02
Same same but different.  Eventually we want to remove it.
2021-11-22 14:43:47 +01:00
Franco Fichtner
e72954234d interfaces: improve newwanip logging a bit 2021-11-22 14:31:25 +01:00
Franco Fichtner
7769964c7d interfaces: old code that "fixed" error is no longer needed
This was repaired a while a go.  Did a few tests and didn't notice
any VLAN disappearing while disable/enable sequences.

See: https://redmine.pfsense.org/issues/3270
2021-11-22 13:55:04 +01:00
Franco Fichtner
148e02c664 interfaces: straighten out mpd5 handling and check for existence later 2021-11-22 13:11:36 +01:00
Franco Fichtner
1a100934b9 interfaces: ignore media settings if interface is not there 2021-11-22 13:02:39 +01:00
Franco Fichtner
4d38eea089 interfaces: avoid recursion by giving proper interface name
Tested both VLAN configuration spots and other callers already
look sane.
2021-11-22 11:37:34 +01:00
Franco Fichtner
c86c868cb2 interfaces: remove obvious expectation mismatch 2021-11-22 11:23:08 +01:00
Franco Fichtner
ddc4f05021 interfaces: refactor linkup to avoid recursing
It already knows 'realif' so we shouldn't try to find out
again.
2021-11-22 10:57:55 +01:00
Franco Fichtner
30fda73f45 interfaces: remove driver-related workaround after over 10 years
See: https://redmine.pfsense.org/issues/846
2021-11-22 10:50:32 +01:00
NOYB
14f3cb5214
Prevent Browser Auto Fill Username/Password (#5311) 2021-11-22 09:03:18 +01:00
NOYB
e6c2530b6d
Stray End Tag (#5364) 2021-11-22 08:55:58 +01:00
Ad Schellevis
88ab77fc85 Cron - shell escape parameters using shlex functions 2021-11-19 19:58:19 +01:00
Ad Schellevis
6db23da495 configd - Jinja2 templates, support shlex_split to split parameters in shell format 2021-11-19 19:56:52 +01:00
Ad Schellevis
d0cc926145 configd - Jinja2 templates, support shlex_quote filter to escape input if needed 2021-11-19 18:53:39 +01:00
Franco Fichtner
ef6f5a268c system: just copyright style cleanups and comment correction 2021-11-19 14:11:37 +01:00
Franco Fichtner
01313ba19e firmware: prep for next beta 2021-11-19 13:58:42 +01:00
Ad Schellevis
aba58e5ee4 Logging: Add a symlink for e.g. system.log to system_todaysdate.log for log parsing (https://github.com/opnsense/core/issues/4993)
same same as dd6a04a68a, but different.
Concerns fixed in this commit:

o archive shouldn't generate files so old "archived" files remain untouched
o "latest.log" should point to the latest version know, which could be todays or a file from the past
o better to not remove links when unchanged to prevent excessive writes
2021-11-18 17:06:40 +01:00
Franco Fichtner
8802b0ced1 system: spacing in previous 2021-11-18 16:30:47 +01:00
Franco Fichtner
0b76f2a821 router advertisements: move static mode out of source address setting
This is incompatible but a little better in code flow.  It's still apparent
that the static mode clashes with CARP so maybe we should stop giving CARP
the benefit of the doubt and the the user decide if the setup should be
static or dyamic CARP or no CARP?
2021-11-18 14:06:05 +01:00
Franco Fichtner
a47949faaa router advertisements: support IP aliases with and without VHID; closes #5185
Deal with case (2) and (3) in the lightest way possible.  This requires
fixes and features for interface-related code, but it's a good field test.  ;)

The static mode isn't really a good construct and will be moved to a checkbox
in the next commit.
2021-11-18 13:37:50 +01:00
Franco Fichtner
65178b937c interfaces: separate the use cases of get_configured_carp_interface_list()
Pages only call these to get lists but get_interface_ip*() functions want
a specific one.  Handroll these cases and simplify the other end.

PR: https://github.com/opnsense/core/pull/5185
2021-11-18 11:41:46 +01:00
Franco Fichtner
d963858af6 dhcp: use friendly descriptions, unify print of CARP address; closes #5354 2021-11-18 11:39:54 +01:00
Franco Fichtner
731a69c6e6 system: add opnsense-log helper POC
Wanted to do this every now and then since people were not
familiar with clog but never got around to do it.  Now that
clog is gone it's easier to do so let's write a few lines
and extend as necessary.  :)

It looks like `tail -f' doesn't watch the symlink and instead
tails the target file which makes nightly rotation invisible
and the log starts stalling so it means for any readers of
latest.log it shouldn't be a persistent read.

PR: https://github.com/opnsense/core/issues/4993
2021-11-18 09:34:27 +01:00
Franco Fichtner
dd6a04a68a system: add "latest.log" symlink and make sure new log is created
We shuffle the cron jobs around a bit to let the script start at
minute 1 of every hour which is close enough.

We might consider a soft-update of the link instead of removing
it every hour depending on how tail -f and such work, but for now
use what PHP has to offer.

PR: https://github.com/opnsense/core/issues/4993
2021-11-18 09:14:25 +01:00
Franco Fichtner
a425eed175 xmlrpc: support authentication using API keys
authenticate_user() is not being called by anyone else so
move it to xmlrpc.php and extend it to allow for API keys
to work.

Since the authentication in this page is always bound to
local credentials it makes sense to extend the user-based
access with the API key-based access as they don't get in
the way of each other.

PR: https://github.com/travisghansen/hass-opnsense/discussions/6
2021-11-18 08:49:31 +01:00