Franco Fichtner
a6c4113508
system: syslog.LOG_DEAMON is a facility
...
Might have unintentional side effecs but bitmask use with wrong
numeric value is dangerous as well.
See: https://docs.python.org/3/library/syslog.html
2023-01-09 12:22:45 +01:00
Ad Schellevis
fcbdc44f63
Unbound - dhcp watcher : when the same fqdn is being reinjected on a different address, it would be removed previously. This commit aims to keep a consistent state when fqdn's move from one host to the other.
...
for https://github.com/opnsense/core/issues/5952
Test data:
lease 172.23.128.214 {
starts 5 2022/08/12 18:17:31;
ends 5 2022/12/12 18:27:31;
tstp 5 2022/08/12 18:52:31;
tsfp 5 2022/08/12 18:52:31;
atsfp 5 2022/08/12 18:52:31;
cltt 5 2022/08/12 18:17:31;
binding state active;
next binding state expired;
hardware ethernet xx:xx:xx:xx:xx:xx;
uid "\001h\327\232\206,\361";
set vendor-class-identifier = "ubnt";
client-hostname "MyDHCPClient";
}
lease 172.23.128.215 {
starts 5 2022/08/12 18:17:31;
ends 5 2022/08/12 18:47:31;
tstp 5 2022/08/12 18:52:31;
tsfp 5 2022/08/12 19:02:31;
atsfp 5 2022/08/12 19:02:31;
cltt 5 2022/08/12 18:17:31;
binding state active;
next binding state expired;
hardware ethernet xx:xx:xx:xx:xx:xx;
uid "\001h\327\232\206,\361";
set vendor-class-identifier = "ubnt";
client-hostname "MyDHCPClient";
}
When 172.23.128.215's end date surpasses "now", a removal after "end" will remove both 172.23.128.215 and 172.23.128.214
2022-08-15 14:48:00 +02:00
Franco Fichtner
483048b9e6
dhcp: upgrade the prefix watcher to production level #5876
...
Just make a MD5 sum of the file and change polling to 20 seconds.
Call backend on first run as well without waiting. Interval could
be lower still, but as said earlier it doesn't matter much all
things considered.
2022-07-20 14:24:26 +02:00
Franco Fichtner
643328486b
dhcp: tabs are okay
2022-07-20 13:19:56 +02:00
Franco Fichtner
856574bbef
dhcp: use a simple periodic update for now; closes #5876
...
Gets rid of package dependency which for dhcpleases6 simply
listens on the DHCPD lease file and runs the prefix.php command
unconditionally.
For now emulate this by issuing the command every 60 seconds
which can be adjusted later if someone complains, but seeing
how many bugs this script has had vs. how many people noticed
it (basically none) I doult this will have much impact overall.
2022-07-20 11:37:18 +02:00
Franco Fichtner
5ce587cee8
dhcp: we seem to keep repairing this script... #5876
...
'prefix' was never a key so this got never executed for whatever reason.
It remains broken in other projects and the question is if this script
really has any useful value.
2022-07-20 11:15:07 +02:00
Josh Soref
20a3c3da38
Spelling ( #5885 )
2022-07-18 13:59:03 +02:00
Franco Fichtner
31f3e82c6b
unbound: ignore CalledProcessError and make a note about it
2022-07-15 13:48:10 +02:00
Franco Fichtner
b7de99e08b
dnsmasq: add dnsmasq watcher; closes #5119
2022-07-15 12:16:36 +02:00
Franco Fichtner
f44dbecd79
dnsmasq: roll this back a bit #5119
2022-07-15 10:26:54 +02:00
Franco Fichtner
b1c7f44102
dnsmasq: make room for dhcpleases obsoletion #5119
2022-07-15 10:08:38 +02:00
Franco Fichtner
2d2b025a5f
dhcp: fix weirdness in prefix crawler
...
PHP complains about unknown access, but the script is
even weirder with unused $active, storing null values
etc.
2022-06-16 13:23:01 +02:00
Franco Fichtner
c0cd729060
src: style sweep
2022-05-09 16:35:22 +02:00
Franco Fichtner
f59b133b01
dhcp: fix plist and add .php suffix for clarity
...
(it's easier to syntax check scripts with a file suffix)
2022-05-06 08:50:19 +02:00
Ad Schellevis
eb0eb519db
Services: DHCPv4 : leases - Move delete action to separate script in configd and offer the ability there to cleanse leases file for duplicate static leases. Since remove a single address or a list of (mac) addresses are two sides of the same coin it seems to make sense to add a script responsible for dhcpdv4 lease cleanup.
...
Hooking this into dhcpd_dhcp_configure before startup also closes https://github.com/opnsense/core/issues/5724
2022-04-28 14:30:46 +02:00
Franco Fichtner
68454bd30c
src: style sweep
2022-03-10 08:38:04 +01:00
Franco Fichtner
e00a9a2031
dhcp: use opnsense-log -n for prefix reads
2022-03-10 08:32:17 +01:00
Ad Schellevis
71a8da452c
DHCPDv6: stream read log and leases files for "dhcpd update prefixes" action, see https://forum.opnsense.org/index.php?topic=27319.msg132541#msg132541
2022-03-04 19:42:48 +01:00
Franco Fichtner
b342645e7c
dhcp: add missing copyright
...
File created in 092462dc10d1a4 by Seth Mos in 2012.
2022-02-14 08:48:41 +01:00
Franco Fichtner
6c12235b07
dhcp: typo
2022-02-03 07:47:45 +01:00
Franco Fichtner
ef9a2e9330
dhcp: quick pass over prefixes.php to support non-clog finally
2022-02-02 09:07:50 +01:00
Ad Schellevis
d756b13f52
python 2->3 scripts/dhcp/get_leases.py
2019-05-13 13:17:48 +02:00
Michael Steenbeek
7ad3d8dff6
Replace some trivial double quotes with single ones
2018-11-23 14:36:44 +01:00
Michael Steenbeek
19ce1c57a4
Replace uncommon <> notation with !=
2018-11-23 14:36:44 +01:00
Franco Fichtner
639bc741c7
dhcp: prefix delete is either a prerequisite, or...
...
an opportunistic delete so mute the failure in the log.
2018-01-10 19:00:40 +01:00
Franco Fichtner
018bea397a
dhcp: second half of @marjohn56's changes; closes #2077
2018-01-10 18:48:57 +01:00
Franco Fichtner
c62f01f993
dhcp: address issue found by @marjohn56
...
PR: https://github.com/opnsense/core/pull/2077
2018-01-10 18:22:36 +01:00
Franco Fichtner
0c2fefab03
src: transform Ad's copyrights, add e-mail everywhere
2017-08-06 11:19:35 +02:00
Ad Schellevis
07f5033bff
add configd command for "dhcpd list leases" for https://github.com/opnsense/core/pull/1472
2017-04-04 20:34:10 +02:00