Compare commits

...
Author SHA1 Message Date
Simon Kelley ac8540c3c5 CHANGELOG entry to RA. 2012-02-26 20:57:31 +00:00
Simon Kelley 22d904db95 Fix RA on *BSD (missing sa_len) 2012-02-26 20:13:45 +00:00
Simon Kelley 741c2952d4 Tidy up RA scheduling. 2012-02-25 13:09:18 +00:00
Simon Kelley 96f6979c4f OpenBSD-friendly bld/get-version script 2012-02-25 11:31:15 +00:00
7 changed files with 25 additions and 7 deletions

No files matched your search

+6
View File
@@ -58,6 +58,12 @@ version 2.60
tested alpha code, it is NOT YET PRODUCTION READY. Test tested alpha code, it is NOT YET PRODUCTION READY. Test
reports would be greatly valued. reports would be greatly valued.
Support IPv6 router advertisements. This is a
simple-minded implementation, aimed at providing the
vestigial RA needed to go alongside IPv6. Is picks up
configuration from the DHCPv6 conf, and should just need
enabling with --enable-ra.
version 2.59 version 2.59
Fix regression in 2.58 which caused failure to start up Fix regression in 2.58 which caused failure to start up
+2 -2
View File
@@ -18,10 +18,10 @@ elif grep '\$Format:%d\$' VERSION >/dev/null 2>&1; then
# unsubstituted VERSION, but no git available. # unsubstituted VERSION, but no git available.
echo UNKNOWN echo UNKNOWN
else else
vers=`cat VERSION | sed 's/[(), ]/\n/ g' | grep $v[0-9] | head -n 1` vers=`cat VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep $v[0-9]`
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo ${vers#v} echo "${vers}" | head -n 1 | tail -c +2
else else
cat VERSION cat VERSION
fi fi
+5
View File
@@ -831,6 +831,11 @@ static void sig_handler(int sig)
} }
} }
void send_alarm(void)
{
send_event(pipewrite, EVENT_ALARM, 0, NULL);
}
void send_event(int fd, int event, int data, char *msg) void send_event(int fd, int event, int data, char *msg)
{ {
struct event_desc ev; struct event_desc ev;
+1
View File
@@ -967,6 +967,7 @@ unsigned char *extended_hwaddr(int hwtype, int hwlen, unsigned char *hwaddr,
int make_icmp_sock(void); int make_icmp_sock(void);
int icmp_ping(struct in_addr addr); int icmp_ping(struct in_addr addr);
#endif #endif
void send_alarm(void);
void send_event(int fd, int event, int data, char *msg); void send_event(int fd, int event, int data, char *msg);
void clear_cache_and_reload(time_t now); void clear_cache_and_reload(time_t now);
void poll_resolv(int force, int do_reload, time_t now); void poll_resolv(int force, int do_reload, time_t now);
+3
View File
@@ -106,8 +106,11 @@ void send_from(int fd, int nowild, char *packet, size_t len,
msg.msg_controllen = 0; msg.msg_controllen = 0;
goto retry; goto retry;
} }
if (retry_send()) if (retry_send())
goto retry; goto retry;
my_syslog(LOG_ERR, _("failed to send packet: %s"), strerror(errno));
} }
} }
+1 -1
View File
@@ -348,7 +348,7 @@ static void nl_routechange(struct nlmsghdr *h)
ra_start_unsolicted(dnsmasq_time()); ra_start_unsolicted(dnsmasq_time());
/* cause lease_update_file to run after we return, in case we were called from /* cause lease_update_file to run after we return, in case we were called from
iface_enumerate and can't re-enter it now */ iface_enumerate and can't re-enter it now */
alarm(1); send_alarm();
} }
#endif #endif
+7 -4
View File
@@ -20,10 +20,11 @@
not used by DHCPv4 code. */ not used by DHCPv4 code. */
#include "dnsmasq.h" #include "dnsmasq.h"
#include <netinet/icmp6.h>
#ifdef HAVE_DHCP6 #ifdef HAVE_DHCP6
#include <netinet/icmp6.h>
struct ra_param { struct ra_param {
int ind, managed, found_context, first; int ind, managed, found_context, first;
char *if_name; char *if_name;
@@ -102,8 +103,7 @@ void ra_start_unsolicted(time_t now)
for (context = daemon->ra_contexts; context; context = context->next) for (context = daemon->ra_contexts; context; context = context->next)
context->ra_time = now + (rand16()/13000); context->ra_time = now + (rand16()/13000);
/* re-do ras after a short time, in case the first gets lost. /* re-do frequently for a minute or so, in case the first gets lost. */
This is reset once that's done. */
ra_short_period_start = now; ra_short_period_start = now;
} }
@@ -241,6 +241,9 @@ static void send_ra(int iface, char *iface_name, struct in6_addr *dest)
/* decide where we're sending */ /* decide where we're sending */
memset(&addr, 0, sizeof(addr)); memset(&addr, 0, sizeof(addr));
#ifdef HAVE_SOCKADDR_SA_LEN
addr.sin6_len = sizeof(struct sockaddr_in6);
#endif
addr.sin6_family = AF_INET6; addr.sin6_family = AF_INET6;
addr.sin6_port = htons(IPPROTO_ICMPV6); addr.sin6_port = htons(IPPROTO_ICMPV6);
if (dest) if (dest)
@@ -399,7 +402,7 @@ static int iface_search(struct in6_addr *local, int prefix,
int scope, int if_index, int dad, void *vparam) int scope, int if_index, int dad, void *vparam)
{ {
struct search_param *param = vparam; struct search_param *param = vparam;
struct dhcp_context *context, *tmp; struct dhcp_context *context;
(void)scope; (void)scope;
(void)dad; (void)dad;