Commit Graph

41 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 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
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 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 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
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 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 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
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
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
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
Philip Prindeville a35ebccb26 isc-dhcp: make files/ consistent by flattening
Some /etc/config-destined files are in files/ and suffixed with
.conf while others are in files/etc/config/ which isn't consistent.
Put everything in files/ and call it good.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-04-08 16:17:44 -06:00
Philip Prindeville a0cd1691c3 isc-dhcp: support generic DHCP options
Allow specifying NTP servers, search domains, etc. by the administrator
directly specifying DHCP options (per interface, i.e. per pool).

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-03-29 20:12:03 -06:00
Philip Prindeville 05ca13e17c isc-dhcp: allow explicitly configuring a domain
Setting a domain now results in 'option domain-name "xyzzy";'
being generated globally.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-03-29 20:12:03 -06:00
Daniel Golle 4237ae4890 isc-dhcp: integrate IPv4 DHCP service with procd and netifd
Convert init-script to procd and allow to configure
isc-dhcp-server via UCI. Allow most by-network and by-host options
supported by dnsmasq.
User-defined dhcp-options are not supported yet, neither are tags.

Existing configurations with use-edited /etc/dhcpd.conf are still
respected, hence to enjoy the new features you have to migrate
your configuration to UCI and delete /etc/dhcpd.conf.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-05-20 03:23:48 +02:00
Philip Prindeville ac531a9c54 isc-dhcp: bump version to latest and fix build issues
Version bumped to 4.3.5.  Separated out compile/install steps since
compiling with $DESTDIR yields bogus results. Removed rfc-3527 patch
as something similar (better) is now upstream (well, more complete
error checking anyway). Change relay scripts from '-l ifname' to
'-U ifname' to correspond to upstream changes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-01-06 15:52:28 -07:00
Antony Antony 7f594309bf isc-dhcp: update to 4.3.3. Migrate from oldplackages
Signed-off-by: Antony Antony <antony@phenome.org>
2016-03-25 13:17:46 +01:00