aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq/files
Commit message (Collapse)AuthorAgeFilesLines
* dnsmasq: send procd signal on service reloadFlorian Eckert2017-12-261-1/+1
| | | | | | | Send a SIGHUP signal via procd to the dnsmasq service so the instance(s) re-read(s) the /tmp/hosts/dhcp config. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* dnsmasq: rewrite config on host name modificationFlorian Eckert2017-12-261-1/+1
| | | | | | | If the hostname in /etc/config/system is modified the dnsmasq should also get triggered to rewrite/reload the config. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* dnsmasq: write atomic host fileHans Dedecker2017-12-071-3/+5
| | | | | | | | | | | Different invocations of the dnsmasq init script (e.g. at startup by procd) will rewrite the dhcp host file which might result into dnsmasq reading an empty dhcp host file as it is being rewritten by the dnsmasq init script. Let the dnsmasq init script first write to a temp dhcp host file so it does not overwrite the contents of the existing dhcp host file. Reported-by: Hartmut Birr <e9hack@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* packages: dnsmasq: remove unused stamp fileRoman Yeryomin2017-12-021-4/+0
| | | | | Signed-off-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
* dnsmasq: fix dhcp-host entries with empty macsJo-Philipp Wich2017-11-281-3/+1
| | | | | | | | | | | | | | Due to improper localization of helper variables, "config host" entries without a given mac address may inherit the mac address of a preceeding, leading to invalid generated netive configuration. Fix the issue by marking the "macs" and "tags" helper variables in dhcp_host_add() local, avoiding the need for explicitely resetting them with each invocation. Reported-by: Russell Senior <russell@personaltelco.net> Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* dnsmasq: load instance-specific conf-file if existsEmerson Pinter2017-11-191-7/+7
| | | | | | | Without this change, the instance-specific conf-file is being added to procd_add_jail_mount, but not used by dnsmasq. Signed-off-by: Emerson Pinter <dev@pinter.com.br>
* dnsmasq: add listen_address parameterChristian Lamparter2017-10-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | This patch adds a parser for the uci representation of dnsmasq's "-a | --listen-address" option. In summary, this option forces dnsmasq to listen on the given IP address(es). Both interface and listen-address options may be given, in which case the set of both interfaces and addresses is used. Note that if no interface option is given, but listen_address is, dnsmasq will not automatically listen on the loopback interface. To achieve this, the loopback IP addresses, 127.0.0.1 and/or ::1 must be explicitly added. This option is useful for ujailed dnsmasq instances, that would otherwise fail to work properly, because listening to the "This host on this network" address (aka 0.0.0.0 see rfc1700 page 4) may not be allowed. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> (PKG_RELEASE increase)
* dnsmasq: fix dhcp "ignore" option on wwan interfacesMarcin Jurkowski2017-09-181-2/+3
| | | | | | | | | | | | | | Init script won't append --no-dhcp-interface option if interface protocol is one of: ncm, directip, qmi, mbim. This is caused by IP address assigned to dynamically created netifd interfaces. As a result there's no netmask assigned to the main interface and dhcp_add() function returns prematurely. By moving network subnet check we can ensure that --no-dhcp-interface is properly generated for wwan interfaces. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase; move network checks]
* dnsmasq: fix indentationHans Dedecker2017-08-251-3/+3
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: add support for multiple tags for each host.Kuang Rufan2017-08-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | Currently, dnsmasq support assigning multiple tags to a host record (--dhcp-host), but we only support only 1 tag for a host. The commit makes the following config to be valid: config host option name 'computer' option mac '00:11:22:33:44:55' option ip '192.168.1.100' list tag 'vendor_class' list tag 'vendor_id' config tag 'vendor_class' list dhcp_option 'option:vendor-class,00:...<omitted>' config tag 'vendor_id' option force '1' list dhcp_option 'option:vendor-id-encap,00:...<omitted>' Signed-off-by: Kuang Rufan <kuangrufan@pset.suntec.net> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: add ubus notifications for new leasesJohn Crispin2017-08-221-0/+4
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* dnsmasq: introduce config support for forced DHCP optionsJo-Philipp Wich2017-07-211-5/+9
| | | | | | | | | | | Introduce a new UCI list setting `list dhcp_option_force` which is available in sections of type `dnsmasq` and `dhcp`. The `dhcp_option_force` setting has the same semantics as `dhcp_option` but generates `dhcp-option-force` directives instead of `dhcp-option` ones in emitted native configuration. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* dnsmasq: restore ability to include/exclude raw device namesJo-Philipp Wich2017-07-101-2/+2
| | | | | | | | | | | | | Commit 5cd88f4 "dnsmasq: remove use of uci state for getting network ifname" broke the ability to specify unmanaged network device names for inclusion and exclusion in the uci configuration. Restore support for raw device names by falling back to the input value when "network_get_device" yields no result. Fixes FS#876. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* dnsmasq: dnsmasq --rev-server supportDUPONCHEEL Sébastien2017-07-031-0/+5
| | | | | | | | | | This is functionally the same as --server, but provides some syntactic sugar to make specifying address-to-name queries easier. For example --rev-server=1.2.3.0/24,192.168.0.1 is exactly equivalent to --server=/3.2.1.in-addr.arpa/192.168.0.1 Signed-off-by: DUPONCHEEL Sébastien <sebastien.duponcheel@corp.ovh.com>
* dnsmasq: add dhcp-range tags configurationGrégoire Delattre2017-06-201-1/+8
| | | | | | | | | | | | | | | | | | | dnsmasq can match tags in its dhcp-range configuration, this commit adds the option to configure it in the dhcp section uci configuration: config dhcp 'lan' option interface 'lan' list tag 'blue' list tag '!red' option start '10' option limit '150' option leasetime '12h' generated dnsmasq configuration: dhcp-range=tag:blue,tag:!red,set:lan,192.168.1.10,192.168.1.159,255.255.255.0,12h Signed-off-by: Grégoire Delattre <gregoire.delattre@gmail.com>
* Revert "dnsmasq: manage resolv.conf if when listening on 127.0.0.1#53"Hans Dedecker2017-06-141-35/+25
| | | | | | This reverts commit a53f8ba6771de64c9c82a2e6867791226f3003cb. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: manage resolv.conf if when listening on 127.0.0.1#53Paul Oranje2017-06-121-25/+35
| | | | | | | | | | With this patch the dnsmasq init script manages resolv.conf if and only if when dnsmasq will listen on 127.0.0.1#53 (is main resolver instance). Also, resolvfile is now set irrespective of the value of noresolv. Fixes (partially) FS#785 Signed-off-by: Paul Oranje <por@xs4all.nl>
* dnsmasq: make bind-dynamic 'non-wildcard' interfaces defaultKevin Darbyshire-Bryant2017-06-112-3/+5
| | | | | | | | | | | | | | | 'non-wildcard' interfaces enables dnsmasq's '--bind-dynamic' mode. This binds to interfaces rather than wildcard addresses *and* keeps track of interface comings/goings via a unique Linux api. Quoting dnsmasq's author "bind-dynamic (bind individual addresses, keep up with changes in interface config) ... On linux, there's actually no sane reason not to use --bind-dynamic, and it's only not the default for historical reasons." Let's change history, well on LEDE at least, and change the default! Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* dnsmasq: add dhcp-script hook conditionallyHans Dedecker2017-06-091-1/+13
| | | | | | | | | | | | Commit b32689afd6a661339861086c669e15c936293cf8 added support for dhcp-script hook. Adding dhcp-script config option results into two instances of dnsmasq being run which triggered oom issues on platforms having low memory. The dnsmasq dhcp-script config option will now only be added if at least one of the dhcp, tftp, neigh hotplug dirs has a regular hotplug file or if the dhcpscript uci config option is specified. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: add dhcp-script hook for other packagesNick Brassel2017-05-262-4/+53
| | | | | | | | | | | | | Adds a script which acts as a hook for when dnsmasq creates/destroys a lease, or completes a TFTP file transfer. The hook loops through scripts in appropriate directories inside '/etc/hotplug.d', executing each one with the same arguments supplied by dnsmasq. In case dnsmasq is jailed by ujail the dhcp-script hook will not work as expected as ujail does not yet support executing a script within a jail. Signed-off-by: Nick Brassel <nick@tzarc.org> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: add IPv6 nameserver configuration in server modeArjen de Korte2017-05-161-0/+10
| | | | | | | | | | | When in ra server mode, configure nameservers passed in router announcements from the dns value (which is already used by odhcpd). This also fixes FS#677 by using the global IPv6 address of the router instead of the link local address (if no nameservers are configured). Signed-off-by: Arjen de Korte <build+lede@de-korte.org> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
* dnsmasq: don't propagate DUID from one host to anotherArjen de Korte2017-05-111-1/+1
| | | | | | If no DUID is set for a host, it should be empty, not the last one set for a previous host. Signed-off-by: Arjen de Korte <build+lede@de-korte.org>
* dnsmasq: use append_interface_name when using option --interface-nameHans Dedecker2017-05-091-3/+3
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: add interface-name uci list.Daniel Danzberger2017-05-091-0/+6
| | | | | | | | | | | | | | | | | | This patch adds the interface-name option for each dhcp config in /etc/config/dhcp. With the interface_name option users can define a DNS name for each dhcp section that will be resolved by dnsmasq with the underlaying interface address. For example: config dhcp 'lan' option interface 'lan' ... list interface_name 'home.lan' ... Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
* dnsmasq: make tftp root if not existingAlberto Bursi2017-05-041-1/+1
| | | | | | | | | | If there's a TFTP root directory configured, create it with mkdir -p (which does not throw an error if the folder exists already) before starting dnsmasq. This is useful for TFTP roots in /tmp, for example. Originally submitted by nfw user aka Nathaniel Wesley Filardo Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
* dnsmasq: fix dhcp_option usage warningHans Dedecker2017-05-041-1/+2
| | | | | | | Don't display unnecessary dhcp_option usage warning in case dhcp_option is empty Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: support dhcp_option config as a listHans Dedecker2017-04-271-4/+21
| | | | | | | | | | Configuring dhcp_option as an option does not allow the usage of white spaces in the option value; fix this by supporting dhcp_option as a list config while still supporting the option config to maintain backwards compatibility Signed-off-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: fix uninitialized varname in init-scriptBastian Bittorf2017-04-171-1/+1
| | | | | | | | | minor/cosmetic: fixes the following misleading message: root@box:~ /etc/init.d/dnsmasq restart sh: out of range Signed-off-by: Bastian Bittorf <bb@npl.de>
* dnsmasq: peacefully coexist with ISC DHCPdDaniel Golle2017-04-081-0/+9
| | | | | | | | Similar to odhcpd, allow using ISC DHCPd instead of dnsmasq. Disable DHCP and/or DHCP6 in case ISC DHCP is present and enabled. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* dnsmasq: use logical interface name for dhcp relay configKarl Vogel2017-03-291-1/+2
| | | | | | | | | The relay section should use the logical interface name and not the linux network device name directly. This to be consistent with other sections of the dnsmasq config where 'interface' means the logical interface. Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
* dnsmasq: don't point --resolv-file to default location unconditionallyPhilip Prindeville2017-03-181-3/+3
| | | | | | | If noresolv is set, we should not generate a --resolv-file parameter. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [minor cleanup]
* dnsmasq: do not forward rfc6761 excluded domainsKevin Darbyshire-Bryant2017-03-092-2/+22
| | | | | | | | | | | | | | | | | | | | | | RFC 6761 defines a number of top level domains should not be forwarded to the Internet's domain servers since they are not responsible for those domains. This change adds a list of domains that will be blocked when 'boguspriv' is used and augments that which is already blocked by dnsmasq's notion of 'local service' using '--bogus-priv' i.e. RFC 1918 private addresses and IPv6 prefixes as defined in RFC 6303. To make this configurable rather than hard coded in dnsmasq's init script, a new file /usr/share/dnsmasq/rfc6761.conf is conditionally included. The default file matches the RFC 6761 recommendation along with a few other top level domains that should not be forwarded to the Internet. Compile & run tested Archer C7 v2 Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* dnsmasq: fix instances in dhcp_add()Eric Luehrsen2017-02-051-2/+2
| | | | | | | | | ref commit 9525743c076393336cd2129539c974f8a01c7894 dnsmasq: make DHCPv6 viable for standalone dnsmasq install Above commit broke instancing by missing filter_dnsmasq() as part of the dhcp_add() execution. Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
* dnsmasq: honor quietdhcp option for DHCPv6Arjen de Korte2017-02-051-0/+1
| | | | | | | | | | | Do not spam the syslog with DHCPv6 lease info if quietdhcp option is selected. This already works for DHCPv4, make it work in the same way for DHCPv6. Signed-off-by: Arjen de Korte <build+lede@de-korte.org> [Originally written by Arjen de Korte on GitHub but had issues providing a SoB in correct format.] Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* dnsmasq: make DHCPv6 viable for standalone dnsmasq installEric Luehrsen2017-02-021-28/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dnsmasq has sufficient services to meet the needs of DHCP and RA with IP6 for single router router users. This is the most common use for consumer routers. Its reenforced as most ISP tend to only DHCP-PD /64. dnsmasq has year over year demonstrated great flexibility in its option set, and support for off-standard DHCP clients. odhcpd has enhanced capabilities focused on IP6 such as DHCP/RA relay and NDP proxy. However, it is not as flexible in its option set. odhcpd is not as forgiving with off-standard DHCP clients. Some points may represent a long term TODO list, but it is the state currently. These changes make any such combination possible. Already odhcpd can be set as the main dhcp server. Now odhcpd can be removed or disabled and dnsmasq will take over if DHCPv6 compiled in. The existing DHCPv6 and RA UCI are translated into dnsmasq.conf. The changes focus on '--dhcp-range', '--dhcp-host', and '--dhcp-options'. DHCP host ID is least 16 bits [::1000-::FFFF], but leaves low range for typical infrastructure assignments. dnsmasq accepts DHCPv6 options in the tranditional '--dhcp-option' put they must be prefixed 'option6:'. dnsmasq will also discover SLAAC DNS entries from DHCPv4 clients MAC, and confirm with a ping at least renew. Long term TODO include improving use of dnsmasq relay options for DHCPv4 and DHCPv6 in parallel. It would also be possible to preconfigure DHCP-PD in host-with-options records for fixed infrastructure. Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com> [Jo-Philipp Wich: emit proper IPv6 hostid format in dhcp-host directive] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* dnsmasq: expand 'add_local_hostname' fexibility including FQDNEric Luehrsen2017-02-021-22/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ref commit 612e2276b4a2f57fcbbe79b95bec4a46e89d748c ref commit ec63e3bf1312ab4c666f7417ca9844857214047f 'option add_local_hostname' scripted implementation statically assigns this host in auto generated host file at init. If IFUP or other signals do not occur, then address changes are not tracked. The script doesn't apply all the addresses at an interface. This may make logs obscure. The script only puts the bare host name (maybe not FQDN) in host file, but if '--exapandhosts' is enabled, then /etc/hosts entries will be suffixed, and "127.0.0.1 localhost" becomes "localhost.lan". dnsmasq provides an option to perform this function, but it is rather greedy. '--interface-name=<name>,<iface>' will assign the name to all IP on the specified interface (except link local). This is a useful feature, but some setups depend on the original restrictive behavior. 'option add_local_fqdn' is added to enhance the feature set, but if not entered or empty string, then it will default to original option and behavior. This new option has a few settings. At each increased setting the most detailed name becomes the PTR record: 0 - same as add_local_hostname 0 or disabled 1 - same as add_local_hostname 1 2 - assigns the bare host name to all IP w/ --dnsmasq-interface 3 - assigns the FQDN and host to all IP w/ --dnsmasq-interface 4 - assigns <iface>.<host>.<domain> and above w/ --dnsmasq-nterface 'option add_wan_fqdn' is added to run the same procedure on inferred WAN intefaces. If an interface has 'config dhcp' and 'option ignore 1' set, then it is considered WAN. The original option would only run on DHCP serving interfaces. Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
* dnsmasq: use ubus signalling in ntp hotplug scriptKevin Darbyshire-Bryant2017-01-131-3/+3
| | | | | | | Use ubus process signalling instead of 'kill pidof dnsmasq' for SIGHUP signalling to dnsmasq when ntp says time is valid. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* Revert "dnsmasq: change 'add_local_hostname' to use dnsmasq '--interface-name'"Hans Dedecker2017-01-121-30/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This causes problem when a FQDN is configured in /etc/config/system. The domain name will appear twice in reverse DNS. Next to that, there seems to be a bug in dnsmasq. From the manual page: --interface-name=<name>,<interface>[/4|/6] Return a DNS record associating the name with the primary address on the given interface. This flag specifies an A or AAAA record for the given name in the same way as an /etc/hosts line, except that the address is not constant, but taken from the given interface. The interface may be followed by "/4" or "/6" to specify that only IPv4 or IPv6 addresses of the interface should be used. If the interface is down, not configured or non-existent, an empty record is returned. The matching PTR record is also created, mapping the interface address to the name. More than one name may be associated with an interface address by repeating the flag; in that case the first instance is used for the reverse address-to-name mapping. It does not just create an A/AAAA record for the primary address, it creates one for all addresses. And what is worse, it seems to actually resolve to the non-primary address first. This is quite annoying when you use floating IP addresses (e.g. VRRP), because when the floating IP is on the other device, SSH failes due to incorrect entry in the known hosts file. I know that this is not a common setup, but it would be nice if there was an option to restore the previous behaviour, rather than just forcing this new feature on everybody. Reported-by: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: change 'add_local_hostname' to use dnsmasq '--interface-name'Eric Luehrsen2017-01-051-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | 'add_local_hostname' previous implementation may drop some addresses. Soft addition of IP6 addresses may not cause a reload or restart event. dnsmasq '--interface-name' robustly applies DNS to all addresses per interface (except fe80::/10). Change UCI 'add_local_hostname' to expand during each interface assignement during add_dhcp(). Assign '<iface>.<host>.<domain>' as true name (reflexive A, AAAA, and PTR). Assign '<host>.<domain>' and '<host>' as convinience aliases (no PTR, not technically CNAME). This is accomplished with the '--interface-name' order, first is PTR. We could also assign each <ip4/6>.<iface>.<host>.<domain> to the respective dual stack on the interface. That seemed excessive so it was skipped (/4 or /6 suffix to the interface). Add UCI 'add_wan_hostname' similar to 'add_local_hostname' function for external WAN. WAN IP4 are less often named by the ISP and rarely WAN IP6 due to complexity. For logs, LuCI connection graph, and other uses assigning a WAN name is desired. 'add_local_hostname' only applies with DHCP and 'add_wam_hostname' only applies without DHCP. Common residential users will want to set both options TRUE. Businesses will probably have global DNS, static IP, and 'add_wan_hostname' FALSE. Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
* dnsmasq: clean up white space in dnsmasq.initEric Luehrsen2017-01-051-16/+16
| | | | Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
* dnsmasq: add DHCP Unique Identifier for DHCPv6Arjen de Korte2017-01-031-1/+2
| | | | | | | Add DHCPv6 matching by DHCP Unique Identifier (RFC-3315) in addition to existing MAC-address (RFC-6939). The latter is not widely supported yet. Signed-off-by: Arjen de Korte <build+lede@de-korte.org>
* dnsmasq: add log facility optiondibdot2016-12-231-0/+1
| | | | | | add possibility to set the facility to which dnsmasq will send syslog entries, i.e. set it to '/dev/null' to mute dnsmasq output at all. Signed-off-by: Dirk Brenken dev@brenken.org
* dnsmasq: fix service reloadJohn Crispin2016-12-161-2/+1
| | | | | | | | | | | The SIGHUP also got sent to the reload script making it bail out with an error Revert "dnsmasq: reload config if host name is modified" This reverts commit 854459a2f923376e0e509ebc0fb8ff90e9f13c02. Reported-by: Hans Dedecker <dedeckeh@gmail.com> Signed-off-by: John Crispin <john@phrozen.org>
* dnsmasq: Specify directory /tmp/hosts as argument for --addn-hostsHans Dedecker2016-12-131-1/+1
| | | | | | | Let dnsmasq read all hosts files in /tmp/hosts directory by specifying /tmp/hosts as argument of --addn-host Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: Fix splitting hostid for DHCPv6 static leasesArjen de Korte2016-12-061-1/+1
| | | | | | | | | Correct splitting the 32-bit 'hostid' value to two 16-bit hexadecimal values. Previously, the lower 16-bit value was truncated to an 8-bit value, which would result in hostid values 100 and 200 both to be set to [::0:0] instead of [::0:100] and [::0:200] respectively. Signed-off-by: Arjen de Korte <build+lede@de-korte.org>
* dnsmasq: reload config if host name is modifiedFlorian Eckert2016-12-041-1/+2
| | | | | | | If the hostname in /etc/config/system is modified the dnsmasq will not reread the update host file under /tmp/hosts/dhcp.$cfg. Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
* dnsmasq: Support add-mac optionHans Dedecker2016-11-081-0/+6
| | | | | | | | | | | | | | | | Adds the mac address of the DNS requestor to DNS queries which are forwarded upstream and can be used to do filtering by the upstream servers. This only works if the requestor is on the same subnet as the dnsmasq server The addmac parameter can hold the following values: 0 : mac address is not added 1 : mac address is added in binary format base64 : mac address is added base64 encoded text: : mac address is added in human readable format as hex and colons Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* dnsmasq: support log-dhcp optionKarl Palsson2016-11-021-0/+1
| | | | | | Helpful when trying to resolve issues with quirky dhcp client devices. Signed-off-by: Karl Palsson <karlp@etactica.com>
* 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>