Changeset 32624


Ignore:
Timestamp:
2012-07-05T19:54:14+02:00 (6 years ago)
Author:
jow
Message:

package/dnsmasq: allow /etc/config/dhcp to specify --address arguments

Add a config list to the 'config dnsmasq' section to specify fixed DNS
addresses.

For example:

config dnsmasq:

[snip]
list address '/example.com/192.168.0.1'

will result in the argument '-A /example.com/192.168.0.1' to the dnsmasq
options. This configures dnsmasq to return the specified IP for any
queries to '*.example.com' names.

Useful for overriding lookups to a range of DNS names.

[jow: "append args" -> "xappend", "-A" -> "--address"]

Signed-off-by: Jeremy Kerr <jk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/dnsmasq/files/dnsmasq.init

    r32623 r32624  
    5454append_server() { 
    5555        xappend "--server=$1" 
     56} 
     57 
     58append_address() { 
     59        xappend "--address=$1" 
    5660} 
    5761 
     
    104108        append_parm "$cfg" "local" "--server" 
    105109        config_list_foreach "$cfg" "server" append_server 
     110        config_list_foreach "$cfg" "address" append_address 
    106111        config_list_foreach "$cfg" "interface" append_interface 
    107112        config_list_foreach "$cfg" "notinterface" append_notinterface 
Note: See TracChangeset for help on using the changeset viewer.