Diff for /embedaddon/dnsmasq/src/slaac.c between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2016/11/02 09:57:01 version 1.1.1.4, 2021/03/17 00:56:46
Line 1 Line 1
/* dnsmasq is Copyright (c) 2000-2016 Simon Kelley/* dnsmasq is Copyright (c) 2000-2021 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
               {                {

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>