Hi Ivan,<br><br>This seems like it's a simple fscanf parsing issue. Please try the attached patch (I've also inlined the code below). It seems to fix the issue for me.<br><br><br>int check_allrouters_membership(struct Interface *iface)<br>
{<br> #define ALL_ROUTERS_MCAST "ff020000000000000000000000000002"<br><br> FILE *fp;<br> unsigned int if_idx, allrouters_ok=0;<br> char addr[32+1];<br> char buffer[301] = {""}, *str;<br>
int ret=0;<br><br> if ((fp = fopen(PATH_PROC_NET_IGMP6, "r")) == NULL)<br> {<br> flog(LOG_ERR, "can't open %s: %s", PATH_PROC_NET_IGMP6,<br> strerror(errno));<br> return (-1);<br>
}<br><br> str = fgets(buffer, 300, fp);<br><br> while (str && (ret = sscanf(str, "%u %*s %32[0-9A-Fa-f]", &if_idx, addr)) ) {<br> if (ret == 2) {<br> if (iface->if_index == if_idx) {<br>
if (strncmp(addr, ALL_ROUTERS_MCAST, sizeof(addr)) == 0){<br> allrouters_ok = 1;<br> break;<br> }<br> }<br> }<br> str = fgets(buffer, 300, fp);<br>
}<br><br> fclose(fp);<br><br> if (!allrouters_ok) {<br> flog(LOG_WARNING, "resetting ipv6-allrouters membership on %s", iface->Name);<br> setup_allrouters_membership(iface);<br> }<br>
<br> return(0);<br>}<br><br>I see there's a few other potential problems with similar code in the same file that may need adjustment..<br><br>Thanks,<br>Reuben<br><br><div class="gmail_quote">On Sun, Jun 6, 2010 at 5:41 AM, Ivan Skytte Jørgensen <span dir="ltr"><<a href="mailto:isj-radvddev@i1.dk">isj-radvddev@i1.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Tuesday 04 May 2010 08:47:53 Pekka Savola wrote:<br>
> On Thu, 29 Apr 2010, Ivan Skytte Jørgensen wrote:<br>
</div>...<br>
<div class="im">> Sorry for delay in this. I couldn't reproduce this on F12<br>
> (2.6.32.12-114). (But I did find another bug :-()<br>
<br>
</div>I just checked with kernel 2.6.31 (opensuse 11.2) inside VMWare. I can easily reproduce the error with both radvd-1.6 and the latest source from CVS.<br>
<br>
Configuration:<br>
3 interfaces.(eth0, eth1, eth2)<br>
radvd.conf contains configuration for eth1 and eth2<br>
Procedure:<br>
start radvd<br>
wait<br>
ifdown eth2<br>
wait<br>
ifup eth2<br>
Then radvd continues with "resetting ipv6-allrouters membership on eth2" again and again.<br>
<div><div></div><div class="h5"><br>
Regards,<br>
Ivan<br>
<br>
--<br>
radvd-devel-l mailing list : <a href="mailto:radvd-devel-l@litech.org">radvd-devel-l@litech.org</a><br>
<a href="http://lists.litech.org/listinfo/radvd-devel-l" target="_blank">http://lists.litech.org/listinfo/radvd-devel-l</a><br>
</div></div></blockquote></div><br>