mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-04 13:48:30 +00:00
Compare commits
5
Commits
v2.66test22
...
v2.66rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f9bd08af8 | ||
|
|
4c985dac39 | ||
|
|
3d77c0460d | ||
|
|
3ddad24608 | ||
|
|
6e37ab595c |
No files matched your search
@@ -33,7 +33,7 @@ version 2.66
|
||||
|
||||
Add DNSMASQ_CIRCUIT_ID, DNSMASQ_SUBCRIBER_ID,
|
||||
DNSMASQ_REMOTE_ID variables to the environment of the
|
||||
lease-change script (and the correponding Lua). These hold
|
||||
lease-change script (and the corresponding Lua). These hold
|
||||
information inserted into the DHCP request by a DHCP relay
|
||||
agent. Thanks to Lakefield Communications for providing a
|
||||
bounty for this addition.
|
||||
@@ -47,7 +47,7 @@ version 2.66
|
||||
patch.
|
||||
|
||||
Don't erroneously reject some option names in --dhcp-match
|
||||
options. Thnaks to Benedikt Hochstrasser for the bug report.
|
||||
options. Thanks to Benedikt Hochstrasser for the bug report.
|
||||
|
||||
Allow a trailing '*' wildcard in all interface-name
|
||||
configurations. Thanks to Christian Parpart for the patch.
|
||||
|
||||
Vendored
+2
-4
@@ -33,10 +33,8 @@ ifeq ($(DEB_BUILD_ARCH_OS),linux)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (,$(filter noipset,$(DEB_BUILD_OPTIONS)))
|
||||
ifeq ($(DEB_BUILD_ARCH_OS),linux)
|
||||
COPTS += -DHAVE_IPSET
|
||||
endif
|
||||
ifneq (,$(filter noipset,$(DEB_BUILD_OPTIONS)))
|
||||
COPTS += -DNO_IPSET
|
||||
endif
|
||||
|
||||
ifneq (,$(filter nodhcp6,$(DEB_BUILD_OPTIONS)))
|
||||
|
||||
+600
-405
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -721,10 +721,10 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
|
||||
daemon->soa_retry, daemon->soa_expiry,
|
||||
daemon->auth_ttl))
|
||||
anscount++;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* done all questions, set up header and return length of result */
|
||||
/* clear authoritative and truncated flags, set QR flag */
|
||||
|
||||
+2
-2
@@ -135,12 +135,12 @@ RESOLVFILE
|
||||
#define HAVE_TFTP
|
||||
#define HAVE_SCRIPT
|
||||
#define HAVE_AUTH
|
||||
#define HAVE_IPSET
|
||||
/* #define HAVE_LUASCRIPT */
|
||||
/* #define HAVE_BROKEN_RTC */
|
||||
/* #define HAVE_DBUS */
|
||||
/* #define HAVE_IDN */
|
||||
/* #define HAVE_CONNTRACK */
|
||||
/* #define HAVE_IPSET */
|
||||
|
||||
|
||||
/* Default locations for important system files. */
|
||||
@@ -327,7 +327,7 @@ HAVE_SOCKADDR_SA_LEN
|
||||
#undef HAVE_AUTH
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LINUX_NETWORK
|
||||
#if defined(NO_IPSET) || !defined(HAVE_LINUX_NETWORK)
|
||||
#undef HAVE_IPSET
|
||||
#endif
|
||||
|
||||
|
||||
+37
-32
@@ -216,7 +216,8 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
unsigned int ignore = 0;
|
||||
struct state state;
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
struct prefix_class *p;
|
||||
struct prefix_class *p;
|
||||
int dump_all_prefix_classes = 0;
|
||||
#endif
|
||||
|
||||
state.packet_options = inbuff + 4;
|
||||
@@ -478,21 +479,32 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
ignore = 1;
|
||||
}
|
||||
|
||||
tagif = state.tags;
|
||||
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
/* Add the tags associated with prefix classes so we can use the DHCP ranges.
|
||||
These are removed and added back one-at-time for SOLICITs
|
||||
Neccessary to allow REQUEST or RENEW of addresses ADVERTISED under
|
||||
specific classes. */
|
||||
for (p = daemon->prefix_classes; p ; p = p->next)
|
||||
/* OPTION_PREFIX_CLASS in ORO, send addresses in all prefix classes */
|
||||
if (daemon->prefix_classes && (msg_type == DHCP6SOLICIT || msg_type == DHCP6REQUEST))
|
||||
{
|
||||
p->tag.next = tagif;
|
||||
tagif = &p->tag;
|
||||
}
|
||||
void *oro;
|
||||
|
||||
if ((oro = opt6_find(state.packet_options, state.end, OPTION6_ORO, 0)))
|
||||
for (i = 0; i < opt6_len(oro) - 1; i += 2)
|
||||
if (opt6_uint(oro, i, 2) == OPTION6_PREFIX_CLASS)
|
||||
{
|
||||
dump_all_prefix_classes = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (msg_type != DHCP6SOLICIT || dump_all_prefix_classes)
|
||||
/* Add the tags associated with prefix classes so we can use the DHCP ranges.
|
||||
Not done for SOLICIT as we add them one-at-time. */
|
||||
for (p = daemon->prefix_classes; p ; p = p->next)
|
||||
{
|
||||
p->tag.next = state.tags;
|
||||
state.tags = &p->tag;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
tagif = run_tag_if(tagif);
|
||||
tagif = run_tag_if(state.tags);
|
||||
|
||||
/* if all the netids in the ignore list are present, ignore this client */
|
||||
if (daemon->dhcp_ignore)
|
||||
@@ -528,7 +540,7 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
void *rapid_commit = opt6_find(state.packet_options, state.end, OPTION6_RAPID_COMMIT, 0);
|
||||
int address_assigned = 0;
|
||||
/* tags without all prefix-class tags */
|
||||
struct dhcp_netid *solicit_tags = run_tag_if(state.tags);
|
||||
struct dhcp_netid *solicit_tags = tagif;
|
||||
struct dhcp_context *c;
|
||||
|
||||
if (rapid_commit)
|
||||
@@ -565,9 +577,6 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
struct dhcp_lease *ltmp;
|
||||
struct in6_addr *req_addr;
|
||||
struct in6_addr addr;
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
int dump_all_prefix_classes = 0;
|
||||
#endif
|
||||
|
||||
if (!check_ia(&state, opt, &ia_end, &ia_option))
|
||||
continue;
|
||||
@@ -579,20 +588,12 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
if (daemon->prefix_classes && state.ia_type == OPTION6_IA_NA)
|
||||
{
|
||||
void *prefix_opt, *oro;
|
||||
void *prefix_opt;
|
||||
int prefix_class;
|
||||
|
||||
if ((oro = opt6_find(state.packet_options, state.end, OPTION6_ORO, 0)))
|
||||
for (i = 0; i < opt6_len(oro) - 1; i += 2)
|
||||
if (opt6_uint(oro, i, 2) == OPTION6_PREFIX_CLASS)
|
||||
break;
|
||||
|
||||
if (oro && (i < opt6_len(oro) - 1))
|
||||
{
|
||||
/* OPTION_PREFIX_CLASS in ORO, send addresses in all prefix classes */
|
||||
plain_range = 0;
|
||||
dump_all_prefix_classes = 1;
|
||||
}
|
||||
if (dump_all_prefix_classes)
|
||||
/* OPTION_PREFIX_CLASS in ORO, send addresses in all prefix classes */
|
||||
plain_range = 0;
|
||||
else
|
||||
{
|
||||
if ((prefix_opt = opt6_find(opt6_ptr(opt, 12), ia_end, OPTION6_PREFIX_CLASS, 2)))
|
||||
@@ -665,7 +666,7 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
|
||||
/* add address to output packet */
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
if (dump_all_prefix_classes)
|
||||
if (dump_all_prefix_classes && state.ia_type == OPTION6_IA_NA)
|
||||
state.send_prefix_class = prefix_class_from_context(c);
|
||||
#endif
|
||||
add_address(&state, c, lease_time, requested_time, &min_time, req_addr, rapid_commit != NULL, now);
|
||||
@@ -689,7 +690,7 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
lease_time = c->lease_time;
|
||||
/* add address to output packet */
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
if (dump_all_prefix_classes)
|
||||
if (dump_all_prefix_classes && state.ia_type == OPTION6_IA_NA)
|
||||
state.send_prefix_class = prefix_class_from_context(c);
|
||||
#endif
|
||||
add_address(&state, c, lease_time, requested_time, &min_time, &addr, rapid_commit != NULL, now);
|
||||
@@ -706,7 +707,7 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
if ((c = address6_available(context, req_addr, solicit_tags, plain_range)))
|
||||
{
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
if (dump_all_prefix_classes)
|
||||
if (dump_all_prefix_classes && state.ia_type == OPTION6_IA_NA)
|
||||
state.send_prefix_class = prefix_class_from_context(c);
|
||||
#endif
|
||||
add_address(&state, c, c->lease_time, c->lease_time, &min_time, req_addr, rapid_commit != NULL, now);
|
||||
@@ -720,7 +721,7 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
while ((c = address6_allocate(context, state.clid, state.clid_len, state.iaid, ia_counter, solicit_tags, plain_range, &addr)))
|
||||
{
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
if (dump_all_prefix_classes)
|
||||
if (dump_all_prefix_classes && state.ia_type == OPTION6_IA_NA)
|
||||
state.send_prefix_class = prefix_class_from_context(c);
|
||||
#endif
|
||||
add_address(&state, c, c->lease_time, c->lease_time, &min_time, &addr, rapid_commit != NULL, now);
|
||||
@@ -823,6 +824,10 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
|
||||
if (config_ok && have_config(config, CONFIG_TIME))
|
||||
lease_time = config->lease_time;
|
||||
|
||||
#ifdef OPTION6_PREFIX_CLASS
|
||||
if (dump_all_prefix_classes && state.ia_type == OPTION6_IA_NA)
|
||||
state.send_prefix_class = prefix_class_from_context(c);
|
||||
#endif
|
||||
add_address(&state, dynamic, lease_time, requested_time, &min_time, req_addr, 1, now);
|
||||
get_context_tag(&state, dynamic);
|
||||
address_assigned = 1;
|
||||
|
||||
Reference in new issue
Block a user