Commit Graph

59 Commits

Author SHA1 Message Date
Philip Prindeville 7b998865ad isc-dhcpd: Redux of convenience functions avoiding sed/cut
Also minimize messing with $IFS.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-10-15 22:18:09 -06:00
Philip Prindeville 96e720bb6b isc-dhcp: Use 'append' instead of manually appending
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-10-15 22:17:51 -06:00
Leon M. Busch-George dd2daafc6e isc-dhcp: refuse to add empty DHCP range
ipcalc.sh no longer outputs invalid ranges and fails with an error code in
such cases. React to the error.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
2023-10-15 21:35:14 -06:00
Leon M. Busch-George 3ad482078b isc-dhcp: adapt to new ipcalc paradigm
With #12925, 'BROADCAST' will no longer be set if there is no local
broadcast address (rather than holding the global broadcast address).
Prepare for the merge but stay compatible with the old version of ipcalc.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
2023-10-15 21:33:15 -06:00
Philip Prindeville 2faa29c550 isc-dhcp: Allow per-subnet domain names
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-09-17 14:28:10 -06:00
Philip Prindeville 4590decf5b isc-dhcpd: Generate correct delimiter in hex strings
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-09-17 14:28:10 -06:00
Philip Prindeville 1e48b28c3f isc-dhcp: some IoTs need forced rebinding/renewal times
I've noticed my AppleTV's refresh their leases ever minute unless
I explicitly force their renewal time higher, because it doesn't
default to 50% of the lease time.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-07-30 16:09:51 -06:00
Philip Prindeville 95829546d0 isc-dhcp: fix handling multiple instances of 'routes' list
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-07-30 16:08:18 -06:00
Philip Prindeville 8a52c2b742 isc-dhcp: use network_get_device in client scripts
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-07-25 15:55:14 -06:00
Philip Prindeville fc4cd3aee5 isc-dhcp: don't require subnet pools
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-06-19 19:31:45 -06:00
Philip Prindeville f9be61715f isc-dhcp: force sending unrequested parameters
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-06-19 19:27:49 -06:00
Philip Prindeville 98e34afbda isc-dhcp: Update to 4.4.3-P1
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-27 00:05:11 -06:00
Philip Prindeville 31db968a79 isc-dhcp: Fix isc-dhcp-dyndns meta package
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-27 00:04:36 -06:00
Philip Prindeville d2dd1bef71 isc-dhcp: allow suppression of default gateway
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-01 08:54:34 -07:00
Philip Prindeville 5a0f41556f isc-dhcp: make indent consistent in config
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-01 08:53:56 -07:00
Paul Fertser 1e8584dc58 treewide: quote CC and CXX
When CC is set to e.g. "ccache mips-openwrt-linux-musl-gcc" it needs
to be quoted to avoid word splitting on substitution.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2023-01-20 17:44:14 -08:00
Philip Prindeville 94a605f775
Merge pull request #19866 from pprindeville/isc-dhcpd-detect-reload-properly
isc-dhcp: Fix logic to detect if the config file is unchanged
2022-11-11 10:08:15 -07:00
Philip Prindeville 90de55b6bb isc-dhcp: Fix logic to detect if the config file is unchanged
Thanks for Jaymin Patel for pointing the broken logic out.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2022-11-08 20:24:41 -07:00
Philip Prindeville ffe0fc77bd isc-dhcp: support sending explicit default route
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2022-10-21 15:12:19 -07:00
Philip Prindeville 77d9ed5f6e isc-dhcp: avoid gratuitous reload of named
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2022-10-05 11:19:37 -06:00
Philip Prindeville ab396fa584 isc-dhcp: don't use allow-update in bind config
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2022-07-13 21:20:43 -06:00
Philip Prindeville 649244dae2 isc-dhcp: Update to 4.4.3
Note that on 32-bit ARM with MUSL we don't have Unwind_GetIP() so
we need to disable backtraces.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2022-03-15 17:18:24 -06:00
Philip Prindeville 2aff212510 isc-dhcp: detect whether ddns transfers are IPv4 only
If named is configured to not listen on any IPv6 interfaces,
then we should run 'nsupdate' with the '-4' argument.

Also:

* cleanup RFC-1918 address detection;
* don't generate PTR records for domain entries that aren't
  RFC-1918 addresses or these will generate NOTAUTH failures;

We're assuming that we're doing DNS split-horizon and that
internal addresses aren't routable.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2022-03-15 13:25:55 -06:00
Philip Prindeville aa490f0279 isc-dhcp: don't leak mktemp files
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2022-03-15 12:55:21 -06:00
Philip Prindeville b8f1dcd22f
Merge pull request #17718 from pprindeville/isc-dhcp-fix-srvhost-rr
isc-dhcp: properly anchor SRV RR's
2022-01-28 22:33:24 -07:00
Philip Prindeville 93c9a1cb7a isc-dhcp: properly anchor SRV RR's
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2022-01-28 21:32:53 -07:00
Sergey V. Lobanov 768a832df1 isc-dhcp: fix build on macos
isc-dhcp uses system ar tool so build fails on Darwin build host.
Embedded bind lib uses system ar and ranlib tools and fails on Darwin

This patch explicitly specifies ar and ranlib tools for target build

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2022-01-28 12:08:27 -08:00
Philip Prindeville b428e46355 isc-dhcpd: handle extra spaces in routes
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-05-02 18:44:09 -06:00
Philip Prindeville 13f5b57f21 isc-dhcp: add dynamic DNS as meta package
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-03-18 00:21:01 -06:00
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00
Philip Prindeville e05e8dc880 isc-dhcp: support hex strings as option arguments
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-02-05 14:20:05 -07:00
Philip Prindeville 0c360d1c6b isc-dhcp: treat 'config host' like superset of 'config domain'
Not including an A record mapping will cause nsupdate to balk at
CNAME and MX records (and probably SRV as well) because the target
will be unknown at the time of parsing, until the lease gets
activated.

We need these RR's to be in place well before the servers even
come up.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-02-04 14:58:33 -07:00
Philip Prindeville a138ceec86 isc-dhcp: add support for multi-homing in 'domain' configs
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-01-28 18:12:11 -07:00
Philip Prindeville cf8526dbb2 isc-dhcp: support dynamic dns for 10/8 and 172.16/12
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-01-15 21:10:22 -07:00
Philip Prindeville 3a07e294a9 isc-dhcp: add dynamic dns integration for local bind server
Start after named is running.

Add support for "cname", "domain", "mxhost", and "srvhost" configs.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-01-13 11:43:52 -07:00
Philip Prindeville 7fbcaa75e2 isc-dhcp: fix regression in reloading
Introduced in "isc-dhcp: improve startup performance"

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-12-18 18:11:41 -07:00
Philip Prindeville 3e8b7f6ecd isc-dhcp: seeing crashes when attempting to update dynamic dns
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-12-10 18:25:53 -07:00
Philip Prindeville cdd5af4b21 isc-dhcp: add support for RFC-3442 classless routes to hosts
Also avoid forward references to functions.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-09-10 10:43:29 -06:00
Philip Prindeville e8fd996c72 isc-dhcp: add support for RFC-3442 classless IPv4 routes
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-08-28 19:30:42 -06:00
Rosen Penev c79c7b7cc8
isc-dhcp: fix compilation with GCC 10
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-15 17:37:22 -07:00
Philip Prindeville 8193eb5952 isc-dhcp: improve startup performance
On some platforms where interfaces come up very slowly, this can
cause a race-condition with dhcpd coming up before all the interfaces
have finished initializing.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2020-04-21 23:57:33 -06:00
Rosen Penev 2982f950a6 isc-dhcp: fix confused description
Originally https://github.com/openwrt/packages/pull/10044

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-09-26 13:27:48 -07:00
Jan Pavlinec 299e5b0a9b
treewide: add PKG_CPE_ID for better cvescanner coverage
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
2019-09-17 12:40:26 +02:00
Heath Kehoe e86624e13b
isc-dhcp: Remove --disable-tracing from configure args
This fixes a crash that happens when dhcpd is configured with a failover
peer, and the failover peer goes down. The crash is due to a dereference
of a freed object. When tracing is enabled (which is the default) the
object in question is referenced by the tracing code and so doesn't get
freed prematurely. I have observed this crash on two different target
platforms (mips and x86_64), and it is reproducible on non-OpenWRT
distros by building isc-dhcpd using --disable-tracing.

This has been reported to ISC, but their response was that it's a low
priority as the simple work-around is to leave tracing enabled.

Re-enabling the tracing code only increases the size of the executable
by about 24KB.

Signed-off-by: Heath Kehoe <yaheath@gmail.com>
2019-06-03 03:19:07 +00:00
Philip Prindeville b0e73634f7 isc-dhcp: drop .conf suffix on dhcrelay config file
Resolves issue #7235

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-10-28 14:38:56 -06:00
Philip Prindeville db6adb616d isc-dhcp: write resolv.conf per network & dhcp settings
The internal nameservers and the DHCP default domain should be
squirted into /tmp/resolv.conf.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-06-12 13:52:06 -06:00
Philip Prindeville 4097c888f5 isc-dhcp: update to 4.4.1
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-04-29 17:32:30 -06:00
Brian J. Murrell 93420826ab dhcrelay4: add support for up/downstream interfaces
dhcrelay has the ability to monitor interfaces for requests
in a single direction only rather than listening to all
interfaces for requests.

Doing this allows one to suppress the duplication of having
the relay forward requests from the same network that the
DHCP server is on.

Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
2018-04-11 22:08:26 -04:00
Philip Prindeville ec8aa082fc isc-dhcp: allow hosts to have dhcp options
Sometimes it's necessary to set per-host options like:

    list dhcp_option 'option:always-broadcast,true'

for hosts that don't understand unicast replies.  There might
be other options you might want to set on a per-host basis,
such as extensions-path, dhcp-message-text, etc.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-04-09 21:01:33 -06:00
Philip Prindeville 6bfb46ebdb isc-dhcp: fix typeof regex for IP address pattern
Missing backslash in "\d+" for last digit of dotted quad.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-04-08 16:31:28 -06:00