Mailing List Archive

[Bug 381] New: rtm_read() mistakenly ignores some route messages
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug
report.

http://bugzilla.quagga.net/show_bug.cgi?id=381

Summary: rtm_read() mistakenly ignores some route messages
Product: Quagga
Version: CVS
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Medium
Component: zebra
AssignedTo: maintainers@quagga.net
ReportedBy: web@pilot.org.ua


old_pid var is set once and then used forever. Any OS will start reusing PIDs
after certain number of processes finished. In my stress-test setup it happens
once in about 10 minutes, so routes are either not added or not deleted. This is
the relevant code from kernel_socket.c:

void

rtm_read (struct rt_msghdr *rtm)

{

int flags;

u_char zebra_flags;

union sockunion dest, mask, gate;

char ifname[INTERFACE_NAMSIZ + 1];

short ifnlen = 0;



zebra_flags = 0;



/* Discard self send message. */

if (rtm->rtm_type != RTM_GET

&& (rtm->rtm_pid == pid || rtm->rtm_pid == old_pid))

return;


A proposed way to handle this situation correctly could be to use the following
expression:

if (rtm->rtm_type != RTM_GET

&& (rtm->rtm_pid == pid || (rtm->rtm_pid == old_pid && zuptime < 10)))

...where 'zuptime' could reflect zebra uptime. Alternatively we could schedule a
timer right after start with delay of 10, which would fire once and set zuptime
to 10.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
_______________________________________________
Quagga-bugs mailing list
Quagga-bugs@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-bugs