Commit Graph

74 Commits

Author SHA1 Message Date
Yanase Yuki b0d8a3d384 treewide: cleanup URLs
This commit converts plain HTTP URLs to HTTPS, and updates
old or outdated URLs.

Signed-off-by: Yanase Yuki <dev@zpc.st>
2026-05-08 22:28:27 +02:00
Philip Prindeville 6a9f2bcda7 isc-dhcp: don't die when a network restart happens
Our triggering code was using the logical network name and
not the ifname as required.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2026-02-11 11:02:24 -07:00
Philip Prindeville f171043ce8 isc-dhcp: replacing automatic empty needs addzone
Since the RFC-1918 in-addr.arpa empty zones are automatically created,
they will exist, but we can't use modzone on them because that's not
how things work.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2026-02-02 20:48:47 -07:00
Yanase Yuki 66f2422b71 treewide: remove FTP usage
Drop obsolete protocol usage.
Use HTTPS (if possible) or HTTP instead.

Signed-off-by: Yanase Yuki <dev@zpc.st>
2025-12-31 09:22:58 +02:00
Philip Prindeville a050b08db2 isc-dhcp: fix startup issues with RFC-1918 PTR RRs
If isc-dhcp gets restarted, it might have to deal with RFC-1918 zones
being previously populated by an earlier instance.  In that case, we
need to know if we're modified versus initially adding the zones.

The special handling of RFC-1918 zones in Bind is quirky, and there
should be a patch soon to make it more friendly, but in the meantime
you might have to use:

disable-empty-zone 168.192.in-addr.arpa;

Or similar depending on which address block you poach.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-12-13 12:26:38 -07:00
Philip Prindeville 27f55cdbda isc-dhcp: use modzone not addzone so in-addr.arpa works
Updates to in-addr.arpa are being rejected with:

update failed: REFUSED

because we create an empty zone, and then try to add it again
when it already exists.  So use modzone instead to update it.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-12-02 10:03:24 -07:00
Philip Prindeville 13ea3654c3 isc-dhcp: Missing trailing dot on SRV RRs
When generating SRV RRs we're omitting the trailing dot that
roots the domain.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-11-15 09:02:02 +02:00
David Härdeman dc68b66797 isc-dhcp: create zones using rndc
This changes isc-dhcp's init script to create bind zones using the tools
bind provides for that scenario instead of crafting separate zone
configuration by hand.

At the same time, remove the use of /tmp/bind/named.conf.local and add
permissions for dynamic zone creation to bind.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-09-13 13:36:41 -07:00
Philip Prindeville ae8a2d515d isc-dhcpd: quote filenames for safety
Per best practices, we should protect against wildcards in
variable expansions.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-08-14 21:43:00 -06:00
Philip Prindeville 824a344a4a isc-dhcp: fix spacing on forced parameters
If there's a "forced_send" option, then put spaces between multiple
parameter codes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-08-14 21:43:00 -06:00
Philip Prindeville a97218b6c7 isc-dhcp: distinguish between hexstrings and strings
It's a minor difference and they're handled the same, but that
might change as we move to Kea.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-08-14 21:43:00 -06:00
Philip Prindeville 3d2a8e3f8c isc-dhcp: clean up 'if' formatting
We don't use a consistent format of bracket-semicolon, so fix it.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-08-14 21:43:00 -06:00
Philip Prindeville 808d025126 isc-dhcp: fix build issues with stricter compilers
The new gcc in the toolchain is failing K&R style prototypes. There
are also some function pointers passed as parameters that didn't
have prototypes so were causing incompatible pointer clashes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-08-11 17:51:51 -06:00
Robert Marko 1137da20e8 isc-dhcp: Use apk-compatible versioning
Adjust isc-dhcp versioning to be compatible with APK.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-13 11:03:43 +01:00
Philip Prindeville cb543e5b93 isc-dhcpd: don't invoke ipcalc with empty start/range arguments
Handle not having a dynamic pool correctly without ipcalc.sh
generating noise about it.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-07-15 10:05:17 -06:00
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