Mercurial > hg > dhcpcd
changeset 1710:098b96fee1a6 draft
Ensure we have correct memory allocation for number of prefixes.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Thu, 30 Aug 2012 16:26:38 +0000 |
| parents | e83f2e5b3a81 |
| children | e2693c48bd70 |
| files | ipv6rs.c |
| diffstat | 1 files changed, 2 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ipv6rs.c Fri Aug 24 19:05:26 2012 +0000 +++ b/ipv6rs.c Thu Aug 30 16:26:38 2012 +0000 @@ -759,15 +759,9 @@ TAILQ_FOREACH(rao, &rap->options, next) { if (rao->option == NULL) continue; - if (env == NULL) { - switch (rao->type) { - case ND_OPT_PREFIX_INFORMATION: - break; - default: - l++; - } + l++; + if (env == NULL) continue; - } switch (rao->type) { case ND_OPT_PREFIX_INFORMATION: optn = "prefix"; @@ -786,7 +780,6 @@ } snprintf(buffer, sizeof(buffer), "ra%d_%s", i, optn); setvar(&env, prefix, buffer, rao->option); - l++; } }
