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,7 +1027,6 @@ ra_input(void)
|
|||||||
break;
|
break;
|
||||||
#if UIP_ND6_RA_RDNSS
|
#if UIP_ND6_RA_RDNSS
|
||||||
case UIP_ND6_OPT_RDNSS:
|
case UIP_ND6_OPT_RDNSS:
|
||||||
if(UIP_ND6_RA_BUF->flags_reserved & (UIP_ND6_O_FLAG << 6)) {
|
|
||||||
LOG_DBG("Processing RDNSS option\n");
|
LOG_DBG("Processing RDNSS option\n");
|
||||||
uint8_t naddr = (UIP_ND6_OPT_RDNSS_BUF->len - 1) / 2;
|
uint8_t naddr = (UIP_ND6_OPT_RDNSS_BUF->len - 1) / 2;
|
||||||
uip_ipaddr_t *ip = (uip_ipaddr_t *)(&UIP_ND6_OPT_RDNSS_BUF->ip);
|
uip_ipaddr_t *ip = (uip_ipaddr_t *)(&UIP_ND6_OPT_RDNSS_BUF->ip);
|
||||||
@ -1035,11 +1034,10 @@ ra_input(void)
|
|||||||
while(naddr-- > 0) {
|
while(naddr-- > 0) {
|
||||||
LOG_DBG("nameserver: ");
|
LOG_DBG("nameserver: ");
|
||||||
LOG_DBG_6ADDR(ip);
|
LOG_DBG_6ADDR(ip);
|
||||||
LOG_DBG_(" lifetime: %lx\n", uip_ntohl(UIP_ND6_OPT_RDNSS_BUF->lifetime));
|
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));
|
uip_nameserver_update(ip, uip_ntohl(UIP_ND6_OPT_RDNSS_BUF->lifetime));
|
||||||
ip++;
|
ip++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
#endif /* UIP_ND6_RA_RDNSS */
|
#endif /* UIP_ND6_RA_RDNSS */
|
||||||
default:
|
default:
|
||||||
|
@ -118,7 +118,7 @@ be added regardless of their reachability and liveness. */
|
|||||||
#define UIP_ND6_MIN_RA_INTERVAL UIP_CONF_ND6_MIN_RA_INTERVAL
|
#define UIP_ND6_MIN_RA_INTERVAL UIP_CONF_ND6_MIN_RA_INTERVAL
|
||||||
#endif
|
#endif
|
||||||
#define UIP_ND6_M_FLAG 0
|
#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
|
#ifndef UIP_CONF_ROUTER_LIFETIME
|
||||||
#define UIP_ND6_ROUTER_LIFETIME 3 * UIP_ND6_MAX_RA_INTERVAL
|
#define UIP_ND6_ROUTER_LIFETIME 3 * UIP_ND6_MAX_RA_INTERVAL
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user