[radvd-devel-l] [PATCH] don't run into endless loop
Ludwig Nussel
ludwig.nussel at suse.de
Thu May 5 05:00:55 EDT 2011
if an interface has multiple prefixes and one as Base6Interface radvd
would run into an endless loop as it takes the wrong value for
prefix->next;
---
gram.y | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/gram.y b/gram.y
index 1bade1b..6c80f2b 100644
--- a/gram.y
+++ b/gram.y
@@ -399,7 +399,7 @@ prefixdef : prefixhead optional_prefixplist ';'
if ( prefix->if6[0] )
{
struct ifaddrs *ifap = 0, *ifa = 0;
- struct AdvPrefix *next = iface->AdvPrefixList;
+ struct AdvPrefix *next = prefix->next;
if (prefix->PrefixLen != 64) {
flog(LOG_ERR, "Only /64 is allowed with Base6Interface. %s:%d", conf_file, num_lines);
@@ -436,7 +436,6 @@ prefixdef : prefixhead optional_prefixplist ';'
prefix->AdvRouterAddr = 1;
prefix->AutoSelected = 1;
prefix->next = next;
- next = prefix;
if (inet_ntop(ifa->ifa_addr->sa_family, (void *)&(prefix->Prefix), buf, sizeof(buf)) == NULL)
flog(LOG_ERR, "%s: inet_ntop failed in %s, line %d!", ifa->ifa_name, conf_file, num_lines);
--
1.7.3.4
More information about the radvd-devel-l
mailing list