import of dnsmasq-2.55.tar.gz

This commit is contained in:
Simon Kelley committed 2012-01-05 17:31:15 +00:00
1 parent 8ef5ada238
commit c52e189734
16 files changed
+716 -692

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define VERSION "2.54"
#define VERSION "2.55"
#define FTABSIZ 150 /* max number of outstanding requests (default) */
#define MAX_PROCS 20 /* max no children for TCP requests */
+1
View File
@@ -917,6 +917,7 @@ void dhcp_read_ethers(void)
config->flags = CONFIG_FROM_ETHERS;
config->hwaddr = NULL;
config->domain = NULL;
config->netid = NULL;
config->next = daemon->dhcp_conf;
daemon->dhcp_conf = config;
}
+5 -5
View File
@@ -641,6 +641,11 @@ int main (int argc, char **argv)
check_log_writer(&wset);
#ifdef HAVE_LINUX_NETWORK
if (FD_ISSET(daemon->netlinkfd, &rset))
netlink_multicast();
#endif
/* Check for changes to resolv files once per second max. */
/* Don't go silent for long periods if the clock goes backwards. */
if (daemon->last_resolv == 0 ||
@@ -657,11 +662,6 @@ int main (int argc, char **argv)
if (FD_ISSET(piperead, &rset))
async_event(piperead, now);
#ifdef HAVE_LINUX_NETWORK
if (FD_ISSET(daemon->netlinkfd, &rset))
netlink_multicast();
#endif
#ifdef HAVE_DBUS
/* if we didn't create a DBus connection, retry now. */
if ((daemon->options & OPT_DBUS) && !daemon->dbus)
+1 -1
View File
@@ -281,7 +281,7 @@ static void nl_routechange(struct nlmsghdr *h)
return;
/* Force re-reading resolv file right now, for luck. */
poll_resolv(1, 1, dnsmasq_time());
daemon->last_resolv = 0;
if (daemon->srv_save)
{
+22 -13
View File
@@ -931,34 +931,43 @@ static char *parse_dhcp_opt(char *arg, int flags)
while (arg && *arg)
{
char *dom;
if (!(dom = arg = canonicalise_opt(arg)))
char *in, *dom = NULL;
size_t domlen = 1;
/* Allow "." as an empty domain */
if (strcmp (arg, ".") != 0)
{
problem = _("bad domain in dhcp-option");
break;
if (!(dom = canonicalise_opt(arg)))
{
problem = _("bad domain in dhcp-option");
break;
}
domlen = strlen(dom) + 2;
}
newp = opt_malloc(len + strlen(arg) + 2 + header_size);
newp = opt_malloc(len + domlen + header_size);
if (m)
memcpy(newp, m, header_size + len);
{
memcpy(newp, m, header_size + len);
free(m);
}
m = newp;
p = m + header_size;
q = p + len;
/* add string on the end in RFC1035 format */
while (*arg)
for (in = dom; in && *in;)
{
unsigned char *cp = q++;
int j;
for (j = 0; *arg && (*arg != '.'); arg++, j++)
*q++ = *arg;
for (j = 0; *in && (*in != '.'); in++, j++)
*q++ = *in;
*cp = j;
if (*arg)
arg++;
if (*in)
in++;
}
*q++ = 0;
free(dom);
/* Now tail-compress using earlier names. */
newlen = q - p;
for (tail = p + len; *tail; tail += (*tail) + 1)