Stop BGP session even when we are master
Probably a bug; introduced by a patch that made only slaves stop their BGP session. Signed-off-by: Benjamin Cama <benoar@dolka.fr>
This commit is contained in:
parent
625794576e
commit
d48de5fddd
1 changed files with 18 additions and 17 deletions
9
l2tpns.c
9
l2tpns.c
|
|
@ -3395,8 +3395,6 @@ static int still_busy(void)
|
||||||
static clockt last_talked = 0;
|
static clockt last_talked = 0;
|
||||||
static clockt start_busy_wait = 0;
|
static clockt start_busy_wait = 0;
|
||||||
|
|
||||||
if (!config->cluster_iam_master)
|
|
||||||
{
|
|
||||||
#ifdef BGP
|
#ifdef BGP
|
||||||
static time_t stopped_bgp = 0;
|
static time_t stopped_bgp = 0;
|
||||||
if (bgp_configured)
|
if (bgp_configured)
|
||||||
|
|
@ -3411,19 +3409,22 @@ static int still_busy(void)
|
||||||
|
|
||||||
stopped_bgp = time_now;
|
stopped_bgp = time_now;
|
||||||
|
|
||||||
|
if (!config->cluster_iam_master)
|
||||||
|
{
|
||||||
// we don't want to become master
|
// we don't want to become master
|
||||||
cluster_send_ping(0);
|
cluster_send_ping(0);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (time_now < (stopped_bgp + QUIT_DELAY))
|
if (!config->cluster_iam_master && time_now < (stopped_bgp + QUIT_DELAY))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif /* BGP */
|
#endif /* BGP */
|
||||||
|
|
||||||
|
if (!config->cluster_iam_master)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
if (main_quit == QUIT_SHUTDOWN)
|
if (main_quit == QUIT_SHUTDOWN)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue