CVSROOT:        /cvs
Module name:    src
Changes by:     ren...@cvs.openbsd.org  2015/07/20 22:58:48

Modified files:
        usr.sbin/ldpd  : ldpe.c ldpe.h neighbor.c 

Log message:
Fix some awful ipc synchronization issues.

Under some rare circumstances the following can happen:
1 - one neighbor sends a label withdraw followed by a fatal notification
message;
2 - ldpe parses the label withdraw and sends it to lde;
3 - ldpe parses the fatal notification message and closes the session;
4 - lde processes the label withdraw and asks ldpe to send a label release;
5 - at around the same time, ldpe restarts the session with the neighbor;
6 - ldpe processes the lde message and then sends a label release to the new
neighbor.

The problem is that we don't want a message enqueue to a neighbor to be sent
after the session is restarted. If a session is closed, all the enqueued
messages should be discarded.

To acomplish this, we update the peerid of the nbr structure everytime the
session is established.

ok claudio@

Reply via email to