diff --git a/man/dnsmasq.8 b/man/dnsmasq.8 index 91fe672..a13e4f5 100644 --- a/man/dnsmasq.8 +++ b/man/dnsmasq.8 @@ -480,28 +480,36 @@ but provides some syntactic sugar to make specifying address-to-name queries eas is exactly equivalent to .B --server=/3.2.1.in-addr.arpa/192.168.0.1 .TP -.B \-A, --address=//[domain/][] +.B \-A, --address=/[/...]/[] Specify an IP address to return for any host in the given domains. Queries in the domains are never forwarded and always replied to with the specified IP address which may be IPv4 or IPv6. To give -both IPv4 and IPv6 addresses for a domain, use repeated -A flags. +both IPv4 and IPv6 addresses for a domain, use repeated \fB-A\fP flags. +To include multiple IP addresses for a single query, use +\fB--addn-hosts=\fP instead. Note that /etc/hosts and DHCP leases override this for individual names. A common use of this is to redirect the entire doubleclick.net domain to some friendly local web server to avoid banner ads. The -domain specification works in the same was as for --server, with the -additional facility that /#/ matches any domain. Thus ---address=/#/1.2.3.4 will always return 1.2.3.4 for any query not -answered from /etc/hosts or DHCP and not sent to an upstream -nameserver by a more specific --server directive. As for --server, -one or more domains with no address returns a no-such-domain answer, so ---address=/example.com/ is equivalent to --server=/example.com/ and returns -NXDOMAIN for example.com and all its subdomains. +domain specification works in the same was as for \fB--server\fP, with +the additional facility that \fB/#/\fP matches any domain. Thus +\fB--address=/#/1.2.3.4\fP will always return \fB1.2.3.4\fP for any +query not answered from \fB/etc/hosts\fP or DHCP and not sent to an +upstream nameserver by a more specific \fB--server\fP directive. As for +\fB--server\fP, one or more domains with no address returns a +no-such-domain answer, so \fB--address=/example.com/\fP is equivalent to +\fB--server=/example.com/\fP and returns NXDOMAIN for example.com and +all its subdomains. .TP -.B --ipset=//[domain/][,] -Places the resolved IP addresses of queries for the specified domains -in the specified netfilter ip sets. Domains and subdomains are matched -in the same way as --address. These ip sets must already exist. See -ipset(8) for more details. +.B --ipset=/[/...]/[,...] +Places the resolved IP addresses of queries for one or more domains in +the specified Netfilter IP set. If multiple setnames are given, then the +addresses are placed in each of them, subject to the limitations of an +IP set (IPv4 addresses cannot be stored in an IPv6 IP set and vice +versa). Domains and subdomains are matched in the same way as +\fB--address\fP. +These IP sets must already exist. See +.BR ipset (8) +for more details. .TP .B \-m, --mx-host=[[,],] Return an MX record named pointing to the given hostname (if diff --git a/src/option.c b/src/option.c index 6cedef3..d811ed3 100644 --- a/src/option.c +++ b/src/option.c @@ -452,7 +452,7 @@ static struct { { LOPT_DHCP_FQDN, OPT_DHCP_FQDN, NULL, gettext_noop("Use only fully qualified domain names for DHCP clients."), NULL }, { LOPT_GEN_NAMES, ARG_DUP, "[=tag:]", gettext_noop("Generate hostnames based on MAC address for nameless clients."), NULL}, { LOPT_PROXY, ARG_DUP, "[=]...", gettext_noop("Use these DHCP relays as full proxies."), NULL }, - { LOPT_RELAY, ARG_DUP, ",[,]", gettext_noop("Relay DHCP requests to a remote server"), NULL}, + { LOPT_RELAY, ARG_DUP, ",[,]", gettext_noop("Relay DHCP requests to a remote server"), NULL}, { LOPT_CNAME, ARG_DUP, ",[,]", gettext_noop("Specify alias name for LOCAL DNS name."), NULL }, { LOPT_PXE_PROMT, ARG_DUP, ",[]", gettext_noop("Prompt to send to PXE clients."), NULL }, { LOPT_PXE_SERV, ARG_DUP, "", gettext_noop("Boot service for PXE menu."), NULL }, @@ -475,7 +475,7 @@ static struct { { LOPT_AUTHSOA, ARG_ONE, "[,...]", gettext_noop("Set authoritive zone information"), NULL }, { LOPT_AUTHSFS, ARG_DUP, "[,...]", gettext_noop("Secondary authoritative nameservers for forward domains"), NULL }, { LOPT_AUTHPEER, ARG_DUP, "[,...]", gettext_noop("Peers which are allowed to do zone transfer"), NULL }, - { LOPT_IPSET, ARG_DUP, "//[,...]", gettext_noop("Specify ipsets to which matching domains should be added"), NULL }, + { LOPT_IPSET, ARG_DUP, "/[/...]/...", gettext_noop("Specify ipsets to which matching domains should be added"), NULL }, { LOPT_SYNTH, ARG_DUP, ",,[]", gettext_noop("Specify a domain and address range for synthesised names"), NULL }, { LOPT_SEC_VALID, OPT_DNSSEC_VALID, NULL, gettext_noop("Activate DNSSEC validation"), NULL }, { LOPT_TRUST_ANCHOR, ARG_DUP, ",[],...", gettext_noop("Specify trust anchor key digest."), NULL }, @@ -486,7 +486,7 @@ static struct { #ifdef OPTION6_PREFIX_CLASS { LOPT_PREF_CLSS, ARG_DUP, "set:tag,", gettext_noop("Specify DHCPv6 prefix class"), NULL }, #endif - { LOPT_RA_PARAM, ARG_DUP, ",[high,|low,][,]", gettext_noop("Set priority, resend-interval and router-lifetime"), NULL }, + { LOPT_RA_PARAM, ARG_DUP, ",[,][,]", gettext_noop("Set priority, resend-interval and router-lifetime"), NULL }, { LOPT_QUIET_DHCP, OPT_QUIET_DHCP, NULL, gettext_noop("Do not log routine DHCP."), NULL }, { LOPT_QUIET_DHCP6, OPT_QUIET_DHCP6, NULL, gettext_noop("Do not log routine DHCPv6."), NULL }, { LOPT_QUIET_RA, OPT_QUIET_RA, NULL, gettext_noop("Do not log RA."), NULL }, @@ -721,7 +721,7 @@ static void do_usage(void) sprintf(buff, " "); sprintf(buff+4, "--%s%s%s", opts[j].name, eq, desc); - printf("%-40.40s", buff); + printf("%-55.55s", buff); if (usage[i].arg) {