summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 378cc85d..253322c6 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -434,6 +434,15 @@ bgp_sock_err(sock *sk, int err)
struct bgp_conn *conn = sk->data;
struct bgp_proto *p = conn->bgp;
+ /*
+ * This error hook may be called either asynchronously from main
+ * loop, or synchronously from sk_send(). But sk_send() is called
+ * only from bgp_tx() and bgp_kick_tx(), which are both called
+ * asynchronously from main loop. Moreover, they end if err hook is
+ * called. Therefore, we could suppose that it is always called
+ * asynchronously.
+ */
+
bgp_store_error(p, conn, BE_SOCKET, err);
if (err)