Merge pull request #240 from cetic/fix-ra-rdnss
RDNSS and DNSSL do not rely on O Flag
This commit is contained in:
commit
be4535c49e
@ -1027,18 +1027,16 @@ ra_input(void)
|
||||
break;
|
||||
#if UIP_ND6_RA_RDNSS
|
||||
case UIP_ND6_OPT_RDNSS:
|
||||
if(UIP_ND6_RA_BUF->flags_reserved & (UIP_ND6_O_FLAG << 6)) {
|
||||
LOG_DBG("Processing RDNSS option\n");
|
||||
uint8_t naddr = (UIP_ND6_OPT_RDNSS_BUF->len - 1) / 2;
|
||||
uip_ipaddr_t *ip = (uip_ipaddr_t *)(&UIP_ND6_OPT_RDNSS_BUF->ip);
|
||||
LOG_DBG("got %d nameservers\n", naddr);
|
||||
while(naddr-- > 0) {
|
||||
LOG_DBG("nameserver: ");
|
||||
LOG_DBG_6ADDR(ip);
|
||||
LOG_DBG_(" lifetime: %lx\n", uip_ntohl(UIP_ND6_OPT_RDNSS_BUF->lifetime));
|
||||
uip_nameserver_update(ip, uip_ntohl(UIP_ND6_OPT_RDNSS_BUF->lifetime));
|
||||
ip++;
|
||||
}
|
||||
LOG_DBG("Processing RDNSS option\n");
|
||||
uint8_t naddr = (UIP_ND6_OPT_RDNSS_BUF->len - 1) / 2;
|
||||
uip_ipaddr_t *ip = (uip_ipaddr_t *)(&UIP_ND6_OPT_RDNSS_BUF->ip);
|
||||
LOG_DBG("got %d nameservers\n", naddr);
|
||||
while(naddr-- > 0) {
|
||||
LOG_DBG("nameserver: ");
|
||||
LOG_DBG_6ADDR(ip);
|
||||
LOG_DBG_(" lifetime: %lx\n", (unsigned long)uip_ntohl(UIP_ND6_OPT_RDNSS_BUF->lifetime));
|
||||
uip_nameserver_update(ip, uip_ntohl(UIP_ND6_OPT_RDNSS_BUF->lifetime));
|
||||
ip++;
|
||||
}
|
||||
break;
|
||||
#endif /* UIP_ND6_RA_RDNSS */
|
||||
|
@ -118,7 +118,7 @@ be added regardless of their reachability and liveness. */
|
||||
#define UIP_ND6_MIN_RA_INTERVAL UIP_CONF_ND6_MIN_RA_INTERVAL
|
||||
#endif
|
||||
#define UIP_ND6_M_FLAG 0
|
||||
#define UIP_ND6_O_FLAG (UIP_ND6_RA_RDNSS || UIP_ND6_RA_DNSSL)
|
||||
#define UIP_ND6_O_FLAG 0
|
||||
#ifndef UIP_CONF_ROUTER_LIFETIME
|
||||
#define UIP_ND6_ROUTER_LIFETIME 3 * UIP_ND6_MAX_RA_INTERVAL
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user