The global prefixes processed must be one less than the total amount of prefixes, as the link local one occupies one slot

This commit is contained in:
julienabeille 2009-02-25 08:35:52 +00:00
parent e34e97cd6f
commit f95c5df7d9
1 changed files with 1 additions and 1 deletions

View File

@ -746,7 +746,7 @@ uip_nd6_io_ra_input(void) {
/* Prefix information options processing */
i = 0;
while((i < UIP_CONF_ND6_MAX_PREFIXES) && (nd6_opt_prefix_info[i] != NULL)) {
while((i < UIP_CONF_ND6_MAX_PREFIXES - 1) && (nd6_opt_prefix_info[i] != NULL)) {
PRINTF("Processing PREFIX option in RA\n");
if((ntohl((nd6_opt_prefix_info[i])->validlt) >=