Description of problem: rwhod receives but doesn't transmit reliably if using DHCP (eg: via NetworkManager) Version-Release number of selected component (if applicable): rwho-0.17-33.fc14.x86_64 How reproducible: Easy, but its a race condition. Steps to Reproduce: 1. start system 2. wait 5 minutes, then do 'ruptime' on another system 3. note your system isn't showing as up (or at all possibly) Actual results: not up or missing in ruptime output Expected results: system up in ruptime output Additional info: When DHCP is in use, the UP interface list may not be finalized by the time rwhod starts, and rwhod only scans the interface list at startup. The following patch addresses this by scanning the interface list every time just prior to transmitting new information, allowing the network details to change completely since the previous transmission. -- *** rwhod.c_pre Sat May 28 00:11:51 2011 --- rwhod.c Sat May 28 00:12:15 2011 *************** *** 383,388 **** --- 383,390 ---- getboottime(&mywd); while (1) { + if (!configure(sk)) + exit(1); sendpacket(&mywd); (void) sleep(AL_INTERVAL); } *************** *** 603,608 **** --- 605,624 ---- struct sockaddr_in *sn; register struct neighbor *np; + /* forget previous neighbors; interfaces may have changed */ + for (np = neighbors; np != NULL; ) { + register struct neighbor *pp; + + if(np->n_name) + free(np->n_name); + if(np->n_addr) + free(np->n_addr); + pp = np; + np = np->n_next; + free((char *)pp); + } + neighbors = 0; + ifc.ifc_len = sizeof (buf); ifc.ifc_buf = (char *)buf; if (ioctl(s, SIOCGIFCONF, &ifc) < 0) { --
Ian, thanks for reporting, I'll apply the changes as proposed while they fixes the issue for me too. This is a reliable way how to reproduce: 1. run rhowd service on system A 2. stop network on system B 3. start rwhod service on system B 4. wait 12 minutes to mark system B as down (not necessary if wasn't up yet) 5. run 'ruptime' on system A: system B is reported as 'down' 6. start network on system B 7. wait a bit more than 4 minutes 8. run 'ruptime' on system A: system B is still reported as 'down'
rwho-0.17-35.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/rwho-0.17-35.fc15
rwho-0.17-35.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/rwho-0.17-35.fc14
Package rwho-0.17-35.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing rwho-0.17-35.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/rwho-0.17-35.fc15 then log in and leave karma (feedback).
I've tried the FC14 version and it seems ok. Can't test the FC15 one here as I have no FC15 installs yet.
rwho-0.17-35.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
rwho-0.17-35.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.