]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: send notify in OpenSent when stopping manually
authorVitaliy Senchyshyn <vsenchyshyn@toroki.com>
Wed, 2 Oct 2013 10:40:20 +0000 (10:40 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 15 May 2014 17:54:04 +0000 (19:54 +0200)
commit6aa136f1eaeb0dfc1e39e6c2cd6380a399ef126f
treeb1313a9961fe29a4ccf91571a5c772545351084d
parentb366b518401e0b0652cd70d297d3fb67b4803db0
bgpd: send notify in OpenSent when stopping manually

The issue it fixes is that the notification message is not sent to a
second peer when bgp is stopped manually.

According to BGP RFC4271, section 8.2.2, regarding the FSM transitions,
in OpenSent state:

If a ManualStop event (Event 2) is issued in the OpenSent state, the
local system:

  * sends the NOTIFICATION with a Cease,
  * sets the ConnectRetryTimer to zero,
  * releases all BGP resources,
  * drops the TCP connection,
  * sets the ConnectRetryCounter to zero, and
  * changes its state to Idle.

I've added a check for OpenSent state when the notification is sent from
the functions which are called from the CLI commands which
directly/indirectly stop/restart BGP.

Acked-by: Pradosh Mohapatra <pmohapat@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgpd.c
bgpd/bgpd.h