diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2004-01-30 21:36:24 +0000 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2012-01-05 17:31:10 +0000 |
commit | b49644f39fe5b77d085f9c6b21e73b8cb50a5c70 (patch) | |
tree | 05c11091edcc3da341a38fe8c0f4c45cd14fed39 | |
parent | 1ab84e2f3579b1bcd6b881c10bacfa735e3c5008 (diff) | |
download | dnsmasq-b49644f39fe5b77d085f9c6b21e73b8cb50a5c70.tar.gz |
import of dnsmasq-2.2.tar.gzv2.2
-rw-r--r-- | CHANGELOG | 6 | ||||
-rw-r--r-- | dnsmasq-mdk.spec | 2 | ||||
-rw-r--r-- | dnsmasq-rh.spec | 2 | ||||
-rw-r--r-- | dnsmasq-suse.spec | 2 | ||||
-rw-r--r-- | dnsmasq.8 | 20 | ||||
-rw-r--r-- | src/config.h | 5 | ||||
-rw-r--r-- | src/network.c | 17 |
7 files changed, 33 insertions, 21 deletions
@@ -713,3 +713,9 @@ release 2.1 Fix problem with setting domains as "local only". Added support for max message size DHCP option. + +release 2.2 + Fix total lack for DHCP functionality on + Linux systems with IPv6 enabled. + + Move default config file under FreeBSD. diff --git a/dnsmasq-mdk.spec b/dnsmasq-mdk.spec index 3829703..35a1597 100644 --- a/dnsmasq-mdk.spec +++ b/dnsmasq-mdk.spec @@ -5,7 +5,7 @@ ############################################################################### Name: dnsmasq -Version: 2.1 +Version: 2.2 Release: 1 Copyright: GPL Group: System Environment/Daemons diff --git a/dnsmasq-rh.spec b/dnsmasq-rh.spec index 16cb3e6..77ac236 100644 --- a/dnsmasq-rh.spec +++ b/dnsmasq-rh.spec @@ -5,7 +5,7 @@ ############################################################################### Name: dnsmasq -Version: 2.1 +Version: 2.2 Release: 1 Copyright: GPL Group: System Environment/Daemons diff --git a/dnsmasq-suse.spec b/dnsmasq-suse.spec index 4a811b6..33c4998 100644 --- a/dnsmasq-suse.spec +++ b/dnsmasq-suse.spec @@ -5,7 +5,7 @@ ############################################################################### Name: dnsmasq -Version: 2.1 +Version: 2.2 Release: 1 Copyright: GPL Group: Productivity/Networking/DNS/Servers @@ -132,7 +132,7 @@ time is the one used. .TP .B \-R, --no-resolv Don't read /etc/resolv.conf. Get upstream servers only from the command -line or /etc/dnsmasq.conf. +line or the dnsmasq configuration file. .TP .B \-o, --strict-order By default, dnsmasq will send queries to any of the upstream servers @@ -307,10 +307,11 @@ both as "laptop" and "laptop.thekelleys.org.uk". Add the domain-suffix to simple names (without a period) in /etc/hosts in the same way as for DHCP-derived names. .SH CONFIG FILE -At startup, dnsmasq reads /etc/dnsmasq.conf, if it exists. The format of this +At startup, dnsmasq reads /etc/dnsmasq.conf, if it exists. (On +FreeBSD, the file is /usr/local/etc/dnsmasq.conf) The format of this file consists of one option per line, exactly as the long options detailed in the OPTIONS section but without the leading "--". Lines starting with # are comments and ignored. For -options which may only be specified once, /etc/dnsmasq.conf overrides +options which may only be specified once, the configuration file overrides the command line. Use the --conf-file option to specify a different configuration file. .SH NOTES @@ -320,7 +321,7 @@ clears its cache and then re-loads /etc/hosts. If .B --no-poll is set SIGHUP also re-reads /etc/resolv.conf. SIGHUP -does NOT re-read /etc/dnsmasq.conf. +does NOT re-read the configuration file. .PP When it receives a SIGUSR1, .B dnsmasq @@ -365,7 +366,7 @@ dnsmasq can be set to poll both /etc/ppp/resolv.conf and last, giving automatic switching between DNS servers. .PP Upstream servers may also be specified on the command line or in -/etc/dnsmasq.conf. These server specifications optionally take a +the configuration file. These server specifications optionally take a domain name which tells dnsmasq to use that server only to find names in that particular domain. .PP @@ -382,17 +383,20 @@ and run dnsmasq with the option. This second technique allows for dynamic update of the server addresses by PPP or DHCP. .SH FILES -.IR /etc/dnsmasq.conf +.IR /etc/dnsmasq.conf + +.IR /usr/local/etc/dnsmasq.conf .IR /etc/resolv.conf .IR /etc/hosts -.IR /var/lib/misc/dnsmasq.leases +.IR /var/lib/misc/dnsmasq.leases + +.IR /var/db/dnsmasq.leases .IR /var/run/dnsmasq.pid .SH SEE ALSO -.BR dhcp.leases (5), .BR hosts (5), .BR resolver (5) .SH AUTHOR diff --git a/src/config.h b/src/config.h index 39d2375..9d652ed 100644 --- a/src/config.h +++ b/src/config.h @@ -12,14 +12,13 @@ /* Author's email: simon@thekelleys.org.uk */ -#define VERSION "2.1" +#define VERSION "2.2" #define FTABSIZ 150 /* max number of outstanding requests */ #define TIMEOUT 40 /* drop queries after TIMEOUT seconds */ #define LOGRATE 120 /* log table overflows every LOGRATE seconds */ #define CACHESIZ 150 /* default cache size */ #define SMALLDNAME 40 /* most domain names are smaller than this */ -#define CONFFILE "/etc/dnsmasq.conf" #define HOSTSFILE "/etc/hosts" #ifdef __uClinux__ # define RESOLVFILE "/etc/config/resolv.conf" @@ -29,8 +28,10 @@ #define RUNFILE "/var/run/dnsmasq.pid" #ifdef __FreeBSD__ # define LEASEFILE "/var/db/dnsmasq.leases" +# define CONFFILE "/usr/local/etc/dnsmasq.conf" #else # define LEASEFILE "/var/lib/misc/dnsmasq.leases" +# define CONFFILE "/etc/dnsmasq.conf" #endif #define DEFLEASE 3600 /* default lease time, 1 hour */ #define CHUSER "nobody" diff --git a/src/network.c b/src/network.c index 43dd402..3cfed18 100644 --- a/src/network.c +++ b/src/network.c @@ -218,7 +218,8 @@ char *enumerate_interfaces(struct irec **interfacep, { FILE *f = fopen(IP6INTERFACES, "r"); int found = 0; - + union mysockaddr addr6; + if (f) { unsigned int plen, scope, flags, if_idx; @@ -230,18 +231,18 @@ char *enumerate_interfaces(struct irec **interfacep, if (strcmp(devname, ifr->ifr_name) == 0) { int i; - unsigned char *addr6p = (unsigned char *) &addr.in6.sin6_addr; - memset(&addr, 0, sizeof(addr)); - addr.sa.sa_family = AF_INET6; + unsigned char *addr6p = (unsigned char *) &addr6.in6.sin6_addr; + memset(&addr6, 0, sizeof(addr6)); + addr6.sa.sa_family = AF_INET6; for (i=0; i<16; i++) { unsigned int byte; sscanf(addrstring+i+i, "%02x", &byte); addr6p[i] = byte; } - addr.in6.sin6_port = htons(port); - addr.in6.sin6_flowinfo = htonl(0); - addr.in6.sin6_scope_id = htonl(scope); + addr6.in6.sin6_port = htons(port); + addr6.in6.sin6_flowinfo = htonl(0); + addr6.in6.sin6_scope_id = htonl(scope); found = 1; break; @@ -253,7 +254,7 @@ char *enumerate_interfaces(struct irec **interfacep, if (found && (err = add_iface(interfacep, ifr->ifr_flags, ifr->ifr_name, - &addr, names, addrs, except))) + &addr6, names, addrs, except))) goto end; } |