Update to dnsmasq 2.62.

from Brad
This commit is contained in:
ajacoutot 2012-06-08 14:26:22 +00:00
parent 7619732eb9
commit a60160772b
8 changed files with 12 additions and 144 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.24 2012/05/23 09:16:19 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.25 2012/06/08 14:26:22 ajacoutot Exp $
NOT_FOR_ARCHS= ${GCC2_ARCHS}
COMMENT= lightweight caching DNS forwarder, DHCP and TFTP server
DISTNAME= dnsmasq-2.61
REVISION= 1
DISTNAME= dnsmasq-2.62
CATEGORIES= net
MASTER_SITES= http://www.thekelleys.org.uk/dnsmasq/

View File

@ -1,5 +1,5 @@
MD5 (dnsmasq-2.61.tar.gz) = btClwlJN/Dp070lO4kafCQ==
RMD160 (dnsmasq-2.61.tar.gz) = aNrDAOY3wz/iMMGRMlEs6G+61nw=
SHA1 (dnsmasq-2.61.tar.gz) = 0KSoCpsxaByCRggwKwSk3SgtOVg=
SHA256 (dnsmasq-2.61.tar.gz) = dN/tAQgFv0Zj95UlB7SOMXiMpp4g4ceirxRu5Cl0lJ8=
SIZE (dnsmasq-2.61.tar.gz) = 534596
MD5 (dnsmasq-2.62.tar.gz) = 9H5cuPW6xjQ/JLLb4xerQA==
RMD160 (dnsmasq-2.62.tar.gz) = i3zYkKhr+x7KUE+g5DakQSfqSV8=
SHA1 (dnsmasq-2.62.tar.gz) = wBFTGoqSs17eOHUlKTv9+TsgEDk=
SHA256 (dnsmasq-2.62.tar.gz) = LytOQGLzvsNan9ZjYpXyL+BCskOLIwXhpXAxTyQ/8hA=
SIZE (dnsmasq-2.62.tar.gz) = 531616

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-man_dnsmasq_8,v 1.11 2012/04/30 06:02:51 ajacoutot Exp $
--- man/dnsmasq.8.orig Fri Apr 20 16:28:49 2012
+++ man/dnsmasq.8 Fri Apr 20 23:04:18 2012
$OpenBSD: patch-man_dnsmasq_8,v 1.12 2012/06/08 14:26:22 ajacoutot Exp $
--- man/dnsmasq.8.orig Tue May 29 12:06:02 2012
+++ man/dnsmasq.8 Thu May 31 00:12:54 2012
@@ -113,13 +113,12 @@ Specify an alternate path for dnsmasq to record its pr
.TP
.B \-u, --user=<username>
@ -17,7 +17,7 @@ $OpenBSD: patch-man_dnsmasq_8,v 1.11 2012/04/30 06:02:51 ajacoutot Exp $
.TP
.B \-v, --version
Print the version number.
@@ -1430,7 +1429,7 @@ with # are always skipped. This flag may be given on t
@@ -1436,7 +1435,7 @@ with # are always skipped. This flag may be given on t
line or in a configuration file.
.SH CONFIG FILE
At startup, dnsmasq reads
@ -26,7 +26,7 @@ $OpenBSD: patch-man_dnsmasq_8,v 1.11 2012/04/30 06:02:51 ajacoutot Exp $
if it exists. (On
FreeBSD, the file is
.I /usr/local/etc/dnsmasq.conf
@@ -1748,7 +1747,7 @@ dnsmasq has no direct way of determining the charset i
@@ -1754,7 +1753,7 @@ dnsmasq has no direct way of determining the charset i
assume that it is the system default.
.SH FILES

View File

@ -1,44 +0,0 @@
$OpenBSD: patch-src_dnsmasq_c,v 1.2 2012/05/23 09:16:19 ajacoutot Exp $
- code-size tweak.
- Fix non-response to router-solicitations when router-advertisement
configured, but DHCPv6 not configured.
--- src/dnsmasq.c.orig Sun Apr 29 11:01:28 2012
+++ src/dnsmasq.c Mon May 21 13:57:13 2012
@@ -849,14 +849,11 @@ int main (int argc, char **argv)
}
#ifdef HAVE_DHCP6
- if (daemon->dhcp6)
- {
- if (FD_ISSET(daemon->dhcp6fd, &rset))
- dhcp6_packet(now);
+ if (daemon->dhcp6 && FD_ISSET(daemon->dhcp6fd, &rset))
+ dhcp6_packet(now);
- if (daemon->ra_contexts && FD_ISSET(daemon->icmp6fd, &rset))
- icmp6_packet();
- }
+ if (daemon->ra_contexts && FD_ISSET(daemon->icmp6fd, &rset))
+ icmp6_packet();
#endif
# ifdef HAVE_SCRIPT
@@ -1209,13 +1206,9 @@ void clear_cache_and_reload(time_t now)
}
#ifdef HAVE_DHCP6
else if (daemon->ra_contexts)
- {
- /* Not doing DHCP, so no lease system, manage
- alarms for ra only */
- time_t next_event = periodic_ra(now);
- if (next_event != 0)
- alarm((unsigned)difftime(next_event, now));
- }
+ /* Not doing DHCP, so no lease system, manage
+ alarms for ra only */
+ send_alarm(periodic_ra(now), now);
#endif
#endif
}

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-src_lease_c,v 1.1 2012/05/14 13:57:09 ajacoutot Exp $
Fixed bug which caused missing periodic router advertisements with
some configurations.
--- src/lease.c.orig Sun Apr 29 11:01:28 2012
+++ src/lease.c Sun May 13 00:57:29 2012
@@ -310,12 +310,19 @@ void lease_update_file(time_t now)
/* do timed RAs and determine when the next is, also pings to potential SLAAC addresses */
if (daemon->ra_contexts)
{
- time_t ra_event = periodic_slaac(now, leases);
+ time_t event;
- next_event = periodic_ra(now);
+ if ((event = periodic_slaac(now, leases)) != 0)
+ {
+ if (next_event == 0 || difftime(next_event, event) > 0.0)
+ next_event = event;
+ }
- if (next_event == 0 || difftime(next_event, ra_event) > 0.0)
- next_event = ra_event;
+ if ((event = periodic_ra(now)) != 0)
+ {
+ if (next_event == 0 || difftime(next_event, event) > 0.0)
+ next_event = event;
+ }
}
#endif

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-src_radv-protocol_h,v 1.1 2012/05/14 13:57:09 ajacoutot Exp $
Cope with router-solict packets which don't have a valid source address.
--- src/radv-protocol.h.orig Sun May 13 00:39:29 2012
+++ src/radv-protocol.h Sun May 13 00:39:45 2012
@@ -14,7 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define ALL_HOSTS "FF02::1"
+#define ALL_NODES "FF02::1"
#define ALL_ROUTERS "FF02::2"
struct ping_packet {

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-src_radv_c,v 1.1 2012/05/14 13:57:09 ajacoutot Exp $
Cope with router-solict packets which don't have a valid source address.
--- src/radv.c.orig Sun May 13 00:38:50 2012
+++ src/radv.c Sun May 13 00:40:44 2012
@@ -179,7 +179,8 @@ void icmp6_packet(void)
}
my_syslog(MS_DHCP | LOG_INFO, "RTR-SOLICIT(%s) %s", interface, mac);
- send_ra(if_index, interface, &from.sin6_addr);
+ /* source address may not be valid in solicit request. */
+ send_ra(if_index, interface, !IN6_IS_ADDR_UNSPECIFIED(&from.sin6_addr) ? &from.sin6_addr : NULL);
}
}
@@ -317,7 +318,7 @@ static void send_ra(int iface, char *iface_name, struc
addr.sin6_scope_id = iface;
}
else
- inet_pton(AF_INET6, ALL_HOSTS, &addr.sin6_addr);
+ inet_pton(AF_INET6, ALL_NODES, &addr.sin6_addr);
send_from(daemon->icmp6fd, 0, daemon->outpacket.iov_base, save_counter(0),
(union mysockaddr *)&addr, (struct all_addr *)&parm.link_local, iface);

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_util_c,v 1.1 2012/05/23 09:16:19 ajacoutot Exp $
Fix a bug which broke DHCPv6/RA with prefix lengths which are not divisible
by 8.
--- src/util.c.orig Mon May 21 13:55:18 2012
+++ src/util.c Mon May 21 13:55:53 2012
@@ -330,7 +330,7 @@ int is_same_net6(struct in6_addr *a, struct in6_addr *
return 0;
if (pfbits == 0 ||
- (a->s6_addr[pfbytes] >> (8 - pfbits) != b->s6_addr[pfbytes] >> (8 - pfbits)))
+ (a->s6_addr[pfbytes] >> (8 - pfbits) == b->s6_addr[pfbytes] >> (8 - pfbits)))
return 1;
return 0;