Compare commits

...
6 Commits
Author SHA1 Message Date
Simon Kelley 9def963c65 Bump debian version. 2012-12-14 11:58:56 +00:00
Simon Kelley 990123a937 Fix regexp foobar. 2012-12-14 11:56:15 +00:00
Simon Kelley 1d6c639310 Fix broken cache. 2012-12-14 11:19:36 +00:00
Simon Kelley 429798fd08 Allow addresses as well as interface names in --auth-server. 2012-12-10 20:45:53 +00:00
Simon Kelley b5a8dd1dec Fix FTBFS with NO_DHCP. 2012-12-10 11:37:25 +00:00
Simon Kelley 95a0bd3701 Add .gitignore file. 2012-12-10 11:29:03 +00:00
8 changed files with 109 additions and 49 deletions

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
src/*.o
src/*.mo
src/dnsmasq.pot
src/dnsmasq
src/.configured
contrib/wrt/dhcp_lease_time
contrib/wrt/dhcp_release
debian/base/
debian/daemon/
debian/files
debian/substvars
debian/utils-substvars
debian/utils/
+6
View File
@@ -3,6 +3,12 @@ version 2.65
TCP which are not for A and AAAA and which were directed to
non-default servers. Thanks to Niax for the bug report.
Fix failure to build with DHCP support excluded. Thanks to
Gustavo Zacarias for the patch.
Fix nasty regression in 2.64 which completely broke cacheing.
version 2.64
Handle DHCP FQDN options with all flag bits zero and
--dhcp-client-update set. Thanks to Bernd Krumbroeck for
+1 -1
View File
@@ -17,7 +17,7 @@ elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then
# unsubstituted VERSION, but no git available.
echo UNKNOWN
else
vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep $v[0-9]`
vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep ^v[0-9]`
if [ $? -eq 0 ]; then
echo "${vers}" | sort | head -n 1 | sed 's/^v//'
+7 -1
View File
@@ -1,8 +1,14 @@
dnsmasq (2.66-1) unstable; urgency=low
* New upstream.
-- Simon Kelley <simon@thekelleys.org.uk> Fri, 14 Dec 2012 11:58:41 +0000
dnsmasq (2.65-1) unstable; urgency=low
* New upstream.
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 4 Dec 2012 20:58:12 +0000
-- Simon Kelley <simon@thekelleys.org.uk> Fri, 14 Dec 2012 11:34:12 +0000
dnsmasq (2.64-1) unstable; urgency=low
+1 -1
View File
@@ -394,7 +394,7 @@ struct crec *cache_insert(char *name, struct all_addr *addr,
int freed_all = flags & F_REVERSE;
int free_avail = 0;
if(daemon->max_cache_ttl < ttl)
if (daemon->max_cache_ttl != 0 && daemon->max_cache_ttl < ttl)
ttl = daemon->max_cache_ttl;
/* Don't log keys */
+2 -1
View File
@@ -755,7 +755,8 @@ extern struct daemon {
char *lease_file;
char *username, *groupname, *scriptuser;
char *luascript;
char *authserver, *authinterface, *hostmaster;
char *authserver, *hostmaster;
struct iname *authinterface;
struct name_list *secondary_forward_server;
int group_set, osport;
char *domain_suffix;
+36 -21
View File
@@ -114,17 +114,9 @@ int iface_check(int family, struct all_addr *addr, char *name, int *auth)
/* Note: have to check all and not bail out early, so that we set the
"used" flags. */
if (auth)
{
if (daemon->authinterface && strcmp(daemon->authinterface, name) == 0)
{
*auth = 1;
return 1;
}
else
*auth = 0;
}
*auth = 0;
if (daemon->if_names || daemon->if_addrs)
{
@@ -134,25 +126,48 @@ int iface_check(int family, struct all_addr *addr, char *name, int *auth)
if (tmp->name && (strcmp(tmp->name, name) == 0))
ret = tmp->used = 1;
for (tmp = daemon->if_addrs; tmp; tmp = tmp->next)
if (tmp->addr.sa.sa_family == family)
{
if (family == AF_INET &&
tmp->addr.in.sin_addr.s_addr == addr->addr.addr4.s_addr)
ret = tmp->used = 1;
if (addr)
for (tmp = daemon->if_addrs; tmp; tmp = tmp->next)
if (tmp->addr.sa.sa_family == family)
{
if (family == AF_INET &&
tmp->addr.in.sin_addr.s_addr == addr->addr.addr4.s_addr)
ret = tmp->used = 1;
#ifdef HAVE_IPV6
else if (family == AF_INET6 &&
IN6_ARE_ADDR_EQUAL(&tmp->addr.in6.sin6_addr,
&addr->addr.addr6))
ret = tmp->used = 1;
else if (family == AF_INET6 &&
IN6_ARE_ADDR_EQUAL(&tmp->addr.in6.sin6_addr,
&addr->addr.addr6))
ret = tmp->used = 1;
#endif
}
}
}
for (tmp = daemon->if_except; tmp; tmp = tmp->next)
if (tmp->name && (strcmp(tmp->name, name) == 0))
ret = 0;
for (tmp = daemon->authinterface; tmp; tmp = tmp->next)
if (tmp->name)
{
if (strcmp(tmp->name, name) == 0)
break;
}
else if (addr && tmp->addr.sa.sa_family == AF_INET && family == AF_INET &&
tmp->addr.in.sin_addr.s_addr == addr->addr.addr4.s_addr)
break;
#ifdef HAVE_IPV6
else if (addr && tmp->addr.sa.sa_family == AF_INET6 && family == AF_INET6 &&
IN6_ARE_ADDR_EQUAL(&tmp->addr.in6.sin6_addr, &addr->addr.addr6))
break;
#endif
if (tmp && auth)
{
*auth = 1;
ret = 1;
}
return ret;
}
+43 -24
View File
@@ -623,24 +623,6 @@ static void do_usage(void)
#define ret_err(x) do { strcpy(errstr, (x)); return 0; } while (0)
#ifdef HAVE_DHCP
static int is_tag_prefix(char *arg)
{
if (arg && (strstr(arg, "net:") == arg || strstr(arg, "tag:") == arg))
return 1;
return 0;
}
static char *set_prefix(char *arg)
{
if (strstr(arg, "set:") == arg)
return arg+4;
return arg;
}
char *parse_server(char *arg, union mysockaddr *addr, union mysockaddr *source_addr, char *interface, int *flags)
{
int source_port = 0, serv_port = NAMESERVER_PORT;
@@ -728,6 +710,24 @@ char *parse_server(char *arg, union mysockaddr *addr, union mysockaddr *source_a
return NULL;
}
#ifdef HAVE_DHCP
static int is_tag_prefix(char *arg)
{
if (arg && (strstr(arg, "net:") == arg || strstr(arg, "tag:") == arg))
return 1;
return 0;
}
static char *set_prefix(char *arg)
{
if (strstr(arg, "set:") == arg)
return arg+4;
return arg;
}
/* This is too insanely large to keep in-line in the switch */
static int parse_dhcp_opt(char *errstr, char *arg, int flags)
{
@@ -1544,8 +1544,27 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
ret_err(gen_err);
daemon->authserver = opt_string_alloc(arg);
daemon->authinterface = opt_string_alloc(comma);
arg = comma;
do {
struct iname *new = opt_malloc(sizeof(struct iname));
comma = split(arg);
new->name = NULL;
unhide_metas(arg);
if ((new->addr.in.sin_addr.s_addr = inet_addr(arg)) != (in_addr_t)-1)
new->addr.sa.sa_family = AF_INET;
#ifdef HAVE_IPV6
else if (inet_pton(AF_INET6, arg, &new->addr.in6.sin6_addr) > 0)
new->addr.sa.sa_family = AF_INET6;
#endif
else
new->name = opt_string_alloc(arg);
new->next = daemon->authinterface;
daemon->authinterface = new;
arg = comma;
} while (arg);
break;
case LOPT_AUTHSFS: /* --auth-sec-servers */
@@ -1554,7 +1573,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
do {
comma = split(arg);
new = safe_malloc(sizeof(struct name_list));
new = opt_malloc(sizeof(struct name_list));
new->name = opt_string_alloc(arg);
new->next = daemon->secondary_forward_server;
daemon->secondary_forward_server = new;
@@ -1571,7 +1590,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
if (!comma)
ret_err(gen_err);
new = safe_malloc(sizeof(struct auth_zone));
new = opt_malloc(sizeof(struct auth_zone));
new->domain = opt_string_alloc(arg);
new->subnet = NULL;
new->next = daemon->auth_zones;
@@ -1581,7 +1600,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
{
int prefixlen = 0;
char *prefix;
struct subnet *subnet = safe_malloc(sizeof(struct subnet));
struct subnet *subnet = opt_malloc(sizeof(struct subnet));
subnet->next = new->subnet;
new->subnet = subnet;
@@ -1660,7 +1679,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
{
if (comma)
{
struct cond_domain *new = safe_malloc(sizeof(struct cond_domain));
struct cond_domain *new = opt_malloc(sizeof(struct cond_domain));
char *netpart;
unhide_metas(comma);