version 1.1.1.2, 2014/06/15 16:31:38
|
version 1.1.1.5, 2023/09/27 11:02:07
|
Line 1
|
Line 1
|
/* dnsmasq is Copyright (c) 2000-2014 Simon Kelley | /* dnsmasq is Copyright (c) 2000-2022 Simon Kelley |
|
|
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
Line 94 void slaac_add_addrs(struct dhcp_lease *lease, time_t
|
Line 94 void slaac_add_addrs(struct dhcp_lease *lease, time_t
|
slaac->backoff = 1; |
slaac->backoff = 1; |
slaac->addr = addr; |
slaac->addr = addr; |
/* Do RA's to prod it */ |
/* Do RA's to prod it */ |
ra_start_unsolicted(now, context); | ra_start_unsolicited(now, context); |
} |
} |
|
|
if (slaac) |
if (slaac) |
Line 146 time_t periodic_slaac(time_t now, struct dhcp_lease *l
|
Line 146 time_t periodic_slaac(time_t now, struct dhcp_lease *l
|
struct ping_packet *ping; |
struct ping_packet *ping; |
struct sockaddr_in6 addr; |
struct sockaddr_in6 addr; |
|
|
save_counter(0); | reset_counter(); |
ping = expand(sizeof(struct ping_packet)); | |
| if (!(ping = expand(sizeof(struct ping_packet)))) |
| continue; |
| |
ping->type = ICMP6_ECHO_REQUEST; |
ping->type = ICMP6_ECHO_REQUEST; |
ping->code = 0; |
ping->code = 0; |
ping->identifier = ping_id; |
ping->identifier = ping_id; |
Line 161 time_t periodic_slaac(time_t now, struct dhcp_lease *l
|
Line 164 time_t periodic_slaac(time_t now, struct dhcp_lease *l
|
addr.sin6_port = htons(IPPROTO_ICMPV6); |
addr.sin6_port = htons(IPPROTO_ICMPV6); |
addr.sin6_addr = slaac->addr; |
addr.sin6_addr = slaac->addr; |
|
|
if (sendto(daemon->icmp6fd, daemon->outpacket.iov_base, save_counter(0), 0, | if (sendto(daemon->icmp6fd, daemon->outpacket.iov_base, save_counter(-1), 0, |
(struct sockaddr *)&addr, sizeof(addr)) == -1 && |
(struct sockaddr *)&addr, sizeof(addr)) == -1 && |
errno == EHOSTUNREACH) | errno == EHOSTUNREACH && |
| slaac->backoff == 12) |
slaac->ping_time = 0; /* Give up */ |
slaac->ping_time = 0; /* Give up */ |
else |
else |
{ |
{ |