dnsmasq: add support for set: and tag: pairs
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 19 May 2012 20:17:54 +0000 (20:17 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 19 May 2012 20:17:54 +0000 (20:17 +0000)
commit33e14aad26f47096369042dd93988bea7b58b099
tree62882d517bba5b9392ae62d945f0782581e7de47
parentc16c200e75833d5ada7c4cb797bd243f37bcd692
dnsmasq: add support for set: and tag: pairs

On my network, I have a variety of machines and appliances, some of which need different configuration issues than the default options.

For example:

config host
option name 'client'
option mac '00:01:02:03:04:05'
option ip '192.168.1.20'
option tag 'acme'

config tag acme
option force '1'
list dhcp_option 'option:router,192.168.1.253'
list dhcp_option 'option:domain-name,acme.com'
list dhcp_option 'option:domain-search,acme.com,redfish-solutions.com'

which allows me to override the default router for my client's host, as well as its domain-name, and its domain-search.

this causes the following config lines:

dhcp-host=00:01:02:03:04:05,set:acme,192.168.1.20,client
dhcp-option-force=tag:acme,option:router,192.168.1.253
dhcp-option-force=tag:acme,option:domain-name,acme.com
dhcp-option-force=tag:acme,option:domain-search:acme.com,redfish-solutions.com

This could be useful elsewhere, for instance, if you have an IP CCTV that you don't want to have a default-route, etc.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
SVN-Revision: 31815
package/dnsmasq/files/dnsmasq.init