aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq/files
Commit message (Collapse)AuthorAgeFilesLines
* dnsmasq: Multiple dnsmasq instances supportHans Dedecker2016-10-261-185/+270
| | | | | | | | | | | | | | | | | | | Adds support in uci for configuring multiple dnsmasq instances via multiple dnsmasq sections. The uci sections host, boot, mac, tag, vendorclass, userclass, circuitid, ... will refer to a dnsmasq instance via the instance parameter defined in the section; if the instance parameter is not specified backwards compatibility is preserved. Start/Stopping a dnsmasq instance can be achieved by passing the dnsmasq instance name as argument to start/stop via the init script. Multiple dnsmasq instances is usefull in scenarios where you want to bind a dnsmasq instance to an interface in order to isolate networks. This patch is a rework of a multiple dnsmasq instance patch by Daniel Dickinson Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: Add match section supportHans Dedecker2016-09-191-0/+17
| | | | | | | | | | | | | | | Match sections allow to set a tag specified by the option networkid if the client sends an option and optionally the option value specified by the match option. The force option will convert the dhcp-option to force-dhcp-option if set to 1 in the dnsmasq config if options are specified in the dhcp_option option. config match option networkid tag option match 12,myhost option force 1 list dhcp_option '3,192.168.1.1' Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: fix remove pidfile on shutdown regressionKevin Darbyshire-Bryant2016-09-061-0/+1
| | | | | | | | | | | | | | Regression introduced by 3481d0d dnsmasq: run as dedicated UID/GID dnsmasq is unable to remove its own pidfile as /var/run/dnsmasq is owned by root and now dnsmasq runs as dnsmasq:dnsmasq. Change directory ownership to match. dnsmasq initially starts as root, creates the pidfile, then drops to requested non-root user. Until this fix dnsmasq had insufficient privilege to remove its own pidfile. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* dnsmasq: drop --interface and --except-interface options when the interface ↵Felix Fietkau2016-07-291-2/+2
| | | | | | cannot be found Signed-off-by: Felix Fietkau <nbd@nbd.name>
* dnsmasq: remove use of uci state for getting network ifnameFelix Fietkau2016-07-291-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* dnsmasq: replace the iface hotplug script with a procd triggerFelix Fietkau2016-07-292-9/+8
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* dnsmasq: make the check for existing DHCP servers more reliableFelix Fietkau2016-07-291-0/+6
| | | | | | If there is no carrier yet, wait for 2 seconds (STP forwarding delay) Signed-off-by: Felix Fietkau <nbd@nbd.name>
* dnsmasq: write atomic config fileUlrich Weber2016-07-291-8/+10
| | | | | | | | | multiple invocation of dnsmasq script (e.g. by procd and hotplugd) might cause procd to restart dnsmasq with an incomplete config file. Config file generation might take quite a long time on larger configs due ubus calls for each listening interface... Signed-off-by: Ulrich Weber <ulrich.weber@riverbed.com>
* dnsmasq: dnssec time handling uses ntpd hotplugKevin Darbyshire-Bryant2016-06-243-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change dnsmasq's dnssec time check handling to use time validity indicated by ntpd rather than maintaining a cross boot/upgrade /etc/dnsmasq.time timestamp file. This saves flash device wear. If ntpd client is configured in uci and you're using dnssec, then dnsmasq will not check dnssec timestamp validity until ntpd hotplug indicates sync via a stratum change. The ntpd hotplug leaves a status flag file to indicate to dnsmasq.init that time is valid and that it should now start in 'check dnssec timestamp valid' mode. If ntpd client is not configured and you're using dnssec, then it is presumed you're using an alternate time sync mechanism and that time is correct, thus dnsmasq checks dnssec timestamps are valid from 1st start. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> V2 - stratum & step ntp changes indicate time is valid V3 - on initial flag file step signal dnsmasq with SIGHUP if running V4 - only accept step ntp changes. Accepting both stratum & step could result in unpleasant script race conditions V5 - Actually only accepting stratum is the correct thing to do after further testing V6 - improve handling of non busybox ntpd if sysntpd not executable dnsmasq checks dnssec timestamps else sysntp script disabled - look for timestamp file - allows external mechanism to use hotplug flag file sysntp script enabled & uci ntp enabled - look for timestamp file sysntp script enabled & uci ntp disabled - dnsmasq checks dnssec timestamps fi
* dnsmasq: support hostid ipv6 address suffix optionKevin Darbyshire-Bryant2016-06-101-1/+29
| | | | | | | | | | | | | | | | | | | | | | Add support for hostid dhcp config entry to dnsmasq. This allows specification of dhcpv6 hostid suffix and works in the same way as odhcpd. Entries in auto generated dnsmasq.conf should conform to: dhcp-host=mm:mm:mm:mm:mm:mm,IPv4addr,[::V6su:ffix],hostname example based on sample config/dhcp entry: config host option name 'Kermit' option mac 'E0:3F:49:A1:D4:AA' option ip '192.168.235.4' option hostid '4' dhcp-host=E0:3F:49:A1:D4:AA,192.168.235.4,[::0:4],Kermit Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* dnsmasq: Add option --max-portHans Dedecker2016-06-101-0/+1
| | | | | | | | | By default dnsmasq uses random ports for outbound dns queries; when the maxport UCI option is specified the ports used will always be smaller than the specified value. This is usefull for systems behind firewalls. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: Set the default dhcp lease file and resolv fileDaniel Dickinson2016-05-241-4/+12
| | | | | | | | Instead of making assumptions about the leasefile and resolv file make sure we use what the user configures, but fall back to defaults if no configuration is specified Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
* dnsmasq: sysupgrade hook to conditionally preserve dnsmasq.timeKevin Darbyshire-Bryant2016-05-191-0/+16
| | | | | | | | | | | | conditionally save dnsmasq.time across sysupgrade dnsmasq uses /etc/dnsmasq.time as record of the last known good system time to aid its validation of dnssec timestamps. dnsmasq updates the timestamp on process start/stop once it considers the system time as valid. The timestamp file should be preserved across system upgrade but should not be included as part of normal configuration backups to prevent restores corrupting the current timestamp. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* Revert "dnsmasq: sysupgrade hook to conditionally preserve dnsmasq.time"Jo-Philipp Wich2016-05-191-16/+0
| | | | | | | | This reverts commit d830cb08826dc593406d9003d061016061b6c3c4. Reverting this commit due to a missing Signed-off-by. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* dnsmasq: sysupgrade hook to conditionally preserve dnsmasq.timeKevin Darbyshire-Bryant2016-05-181-0/+16
| | | | | | | | | | conditionally save dnsmasq.time across sysupgrade dnsmasq uses /etc/dnsmasq.time as record of the last known good system time to aid its validation of dnssec timestamps. dnsmasq updates the timestamp on process start/stop once it considers the system time as valid. The timestamp file should be preserved across system upgrade but should not be included as part of normal configuration backups to prevent restores corrupting the current timestamp.
* branding: add LEDE brandingJohn Crispin2016-03-241-1/+1
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* dnsmasq: run as dedicated UID/GIDJohn Crispin2016-04-261-1/+3
| | | | | | | | | | | Running dnsmasq in a dedicated user/group allows matching its outgoing traffic more easily using iptables' owner match. Add UID/GID to the package metadata and append the user/group parameters to the init script. Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 49252
* dnsmasq: Add enable parameter in the UCI DHCP host sectionHauke Mehrtens2016-04-171-0/+3
| | | | | | | | | | Parameter allows to enable/disable static leases; by default the value is 1 to keep backwards compatibility Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 49187
* dnsmasq: add host-specific lease time option for static hostsJohn Crispin2016-02-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Enable setting a host-specific lease time for static hosts. The new option is called "leasetime" and the format is similar as for the default lease time: e.g. 12h, 3d, infinite Default lease time is used for all hosts for which there is no host-specific definition. The option is added to /etc/config/dhcp for the selected hosts: config host option name 'Nexus' option mac 'd8:50:66:55:59:7c' option ip '192.168.1.245' option leasetime '2h' It gets appended to /var/etc/dnsmasq.conf like this: dhcp-host=d8:50:66:55:59:7c,192.168.1.245,Nexus,2h Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> SVN-Revision: 48801
* dnsmasq: add dhcp relay optionJohn Crispin2016-02-261-0/+19
| | | | | | Signed-off-by: dbugnar <dnbugnar@ocedo.com> SVN-Revision: 48800
* dnsmasq: export tftp root to the procd jailFelix Fietkau2016-02-251-11/+17
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48761
* dnsmasq: only enable tftp if the tftp root existsFelix Fietkau2016-02-251-1/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48760
* dnsmasq: Don't add local hostname if ula prefix is not specifiedJo-Philipp Wich2016-01-251-2/+2
| | | | | | | | | | | | Commit 6a7e56b adds support for adding local hostname for own lan ula adress but if ula prefix is not specified results into an invalid config (address=/OpenWrt.lan/1) causing dnsmasq not to start up. Use lanaddr6 when adding local hostname as the lan ula address is constructed based on the UCI parameters ip6hint and ip6ifaceid and thus not always ula prefix suffixed with 1 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> SVN-Revision: 48495
* dnsmasq: Add option --min-portFelix Fietkau2016-01-151-0/+1
| | | | | | | | | | | By default dnsmasq uses random ports for outbound dns queries; when the minport UCI option is specified the ports used will always be larger than the specified value. This is usefull for systems behind firewalls. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> SVN-Revision: 48244
* dnsmasq: add local hostname record for own lan ula address as wellJo-Philipp Wich2016-01-121-3/+17
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48214
* dnsmasq: Add option --no-pingJohn Crispin2015-12-231-0/+1
| | | | | | | | | | By default dnsmasq sends an ICMP echo request before allocating an IP address to a host; the uci option noping allows to disable this check. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> SVN-Revision: 47974
* dnsmasq: changed option nonwildcard to --bind-dynamicFelix Fietkau2015-12-191-1/+1
| | | | | | | | | | | | | | | | Changed option nonwildcard from --bind-interfaces into --bind-dynamic. With this, Dnsmasq binds the address of individual interfaces, allowing multiple dnsmasq instances, but if new interfaces or addresses appear, it automatically listens on those. This makes dynamically created interfaces work in the same way as the default, but allows also use of other DNS-servers (like Named) at the same time on diffirent interfaces where Dnsmasq is NOT configured, whereas with --bind-interfaces will still reserve every interface even if not used and thus disallowing use of any other DNS-program even on unused interfaces. Tested-by: Vaasa Hacklab <info@vaasa.hacklab.fi> Signed-off-by: Sami Olmari <sami@olmari.fi> SVN-Revision: 47953
* dnsmasq: Add option "--all-servers"John Crispin2015-12-111-0/+1
| | | | | | | | | Add the option "--all-servers" which forces dnsmasq to send all queries to all servers and then take the first answer. Signed-off-by: Andréas Gustafsson <gurgalof@gmail.com> SVN-Revision: 47857
* dnsmasq: make /tmp/dnsmasq.d and /tmp/hosts preferred over UCI settingsSteven Barth2015-09-021-4/+4
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46770
* dnsmasq: add some missing files to the jailJohn Crispin2015-07-241-1/+1
| | | | | | | | found with strace, not sure we got all of them though Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com> SVN-Revision: 46467
* dnsmasq: Add sequential_ip UCI parameterSteven Barth2015-07-071-0/+1
| | | | | | | | | When enabled the dnsmasq DHCP server allocates the IP addresses sequentially starting from the lowest available IP address. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> SVN-Revision: 46211
* dnsmasq: enable extra tracing by default when UCI parameter logqueries is setSteven Barth2015-07-071-1/+1
| | | | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> SVN-Revision: 46210
* dnsmasq: fix config file typoSteven Barth2015-06-081-1/+1
| | | | | | | | s/loclal/local/ Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> SVN-Revision: 45923
* dnsmasq: fix dnssec timestamp logic, backport crashfixSteven Barth2015-04-131-5/+6
| | | | | | Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 45410
* dnsmasq: bump to 2.73rc4Steven Barth2015-04-101-1/+6
| | | | | | | | | Fix crash caused by malformed DNS requests Improved DNSSEC handling Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 45354
* dnsmasq: Add option '--servers-file'John Crispin2015-04-091-0/+1
| | | | | | | | The option '--servers-file' is available since dnsmasq v2.69. Signed-off-by: Lars Kruse <lists@sumpfralle.de> SVN-Revision: 45332
* dnsmasq: backport --tftp-no-fail to ignore missing tftp rootJohn Crispin2015-04-011-0/+1
| | | | | | | | | | | This patch backports the option --tftp-no-fail to dnsmasq and prevents the service from aborting if the specified TFTP root directory is not available; this might be the case if TFTP files are located on external media that might occasionally not be present at startup. Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt@wertarbyte.de> SVN-Revision: 45213
* dnsmasq: we dont want to run in debug modeJohn Crispin2015-03-271-1/+1
| | | | | | | | a left over from the dnsmasq jail testing Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 45058
* dnsmasq: add jail supportJohn Crispin2015-03-261-1/+10
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 45011
* dnsmasq: enable pxe-prompt, pxe-service config optionsJohn Crispin2015-03-131-1/+6
| | | | | | | | | | | | DNSMASQ has the ability to provide a menu to a pxeboot system, using the --pxe-prompt and --pxe-service configuration options. The current init.d script converting the "dhcp" file to "dnsmasq.conf" does not find these options, but they are supported. This patch thus enables the options. Signed-off-by: Derek LaHousse <dlahouss@mtu.edu> SVN-Revision: 44747
* dnsmasq: Make parameters optional in dhcpboot configJohn Crispin2015-03-131-4/+3
| | | | | | | | | The --dhcp-boot option of dnsmasq does not require servername and serveraddress arguments if the builtin tftp server is used. Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt@wertarbyte.de> SVN-Revision: 44744
* dnsmasq: add option --quiet-dhcpJohn Crispin2015-01-171-0/+1
| | | | | | | | The --quiet-dhcp setting increases privacy by omitting DHCP lease logs including MAC addresses. Signed-off-by: Lars Kruse <devel@sumpfralle.de> SVN-Revision: 44006
* dnsmasq: support and use local-service by default (#14951)Jo-Philipp Wich2015-01-162-0/+2
| | | | | | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 43982
* dnsmasq: allow de-selecting features from -full variant.Steven Barth2014-12-171-0/+5
| | | | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> SVN-Revision: 43733
* dnsmasq: Make the --dhcp-host logic easier to understandJohn Crispin2014-08-281-6/+8
| | | | | | | | | | | Use an if/else statement to cover the two different syntaxes. Add comments explaining what the end results should look like. This patch should not change the script's output. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> SVN-Revision: 42320
* dnsmasq: Fix hosts file format when MAC address is not specifiedJohn Crispin2014-08-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | An entry like this in /etc/config/dhcp: config 'host' option 'name' 'pc2' option 'ip' '192.168.100.56' option 'dns' '1' results in a /tmp/hosts/dhcp entry that looks like this: 192.168.100.56 .lan Obviously it should say "pc2.lan". This happens because $name is set to "" in order to support the MAC-less syntax: "--dhcp-host=lap,192.168.0.199". Fix this by reordering the operations. Also, refuse to add a DNS entry if the hostname or IP is missing. Fixes #17683 Reported-by: Kostas Papadopoulos <kpapad75@travelguide.gr> Signed-off-by: Kevin Cernekee <cernekee@gmail.com> SVN-Revision: 42319
* dnsmasq: Create rDNS records for LuCI "Hostnames"John Crispin2014-08-281-6/+3
| | | | | | | | | | | | | LuCI creates "domain" UCI config sections, which the dnsmasq init file then, currently, translates into "address" config lines. This is not the correct usage of "address" (see r36943), and also causes rDNS records to not be created. This patches dnsmasq.init to utilize the additional hosts file introduced in r40799 for such domain names, resolving both issues. Signed-off-by: Tyler Fenby <tylerf@securecominc.com> SVN-Revision: 42318
* dnsmasq: respect option dhcpv4 disabled in dhcp-configSteven Barth2014-08-191-0/+3
| | | | SVN-Revision: 42216
* dnsmasq: use config_get_bool for dnsmasqSteven Barth2014-06-221-1/+1
| | | | SVN-Revision: 41302
* dnsmasq: set procd respawnSteven Barth2014-06-221-0/+1
| | | | SVN-Revision: 41297