mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
fixup! bgp send hold timer: time setable from config
This commit is contained in:
+1
-1
@@ -905,7 +905,7 @@ CF_CLI(RELOAD, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol]]
|
||||
{ proto_apply_cmd($2, proto_cmd_reload, 1, CMD_RELOAD); } ;
|
||||
CF_CLI(RELOAD IN, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol (just imported routes)]])
|
||||
{ proto_apply_cmd($3, proto_cmd_reload, 1, CMD_RELOAD_IN); } ;
|
||||
CF_CLI(RELOAD OUT, proto_patt, [[Reload protocol (just exported routes)]])
|
||||
CF_CLI(RELOAD OUT, proto_patt, <protocol> | \"<pattern>\" | all, [[Reload protocol (just exported routes)]])
|
||||
{ proto_apply_cmd($3, proto_cmd_reload, 1, CMD_RELOAD_OUT); } ;
|
||||
|
||||
CF_CLI_HELP(DEBUG, ..., [[Control protocol debugging via BIRD logs]])
|
||||
|
||||
+2
-2
@@ -699,7 +699,7 @@ bgp_conn_enter_established_state(struct bgp_conn *conn)
|
||||
bmp_peer_up(p, conn->local_open_msg, conn->local_open_length,
|
||||
conn->remote_open_msg, conn->remote_open_length);
|
||||
|
||||
if (p->cf->disable_listening)
|
||||
if (p->cf->disable_rx)
|
||||
conn->sk->rx_hook = NULL; /* broking hook for simulating reading problem */
|
||||
}
|
||||
|
||||
@@ -1027,7 +1027,7 @@ bgp_hold_timeout(timer *t)
|
||||
{
|
||||
struct bgp_conn *conn = t->data;
|
||||
struct bgp_proto *p = conn->bgp;
|
||||
if (p->cf->disable_listening)
|
||||
if (p->cf->disable_rx)
|
||||
return;
|
||||
|
||||
DBG("BGP: Hold timeout\n");
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ struct bgp_config {
|
||||
u8 local_role; /* Set peering role with neighbor [RFC 9234] */
|
||||
int require_roles; /* Require configured roles on both sides */
|
||||
int send_hold_time;
|
||||
int disable_listening; /* Stop reading messages after handshake (for simulating error) */
|
||||
int disable_rx; /* Stop reading messages after handshake (for simulating error) */
|
||||
/* Times below are in seconds */
|
||||
unsigned gr_time; /* Graceful restart timeout */
|
||||
unsigned llgr_time; /* Long-lived graceful restart stale time */
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, HOLD, TIME, CONNECT, RETRY, KEEPALIVE,
|
||||
LIVED, STALE, IMPORT, IBGP, EBGP, MANDATORY, INTERNAL, EXTERNAL, SETS,
|
||||
DYNAMIC, RANGE, NAME, DIGITS, BGP_AIGP, AIGP, ORIGINATE, COST, ENFORCE,
|
||||
FIRST, FREE, VALIDATE, BASE, ROLE, ROLES, PEER, PROVIDER, CUSTOMER,
|
||||
RS_SERVER, RS_CLIENT, REQUIRE, BGP_OTC, GLOBAL, SEND, LISTENING)
|
||||
RS_SERVER, RS_CLIENT, REQUIRE, BGP_OTC, GLOBAL, SEND)
|
||||
|
||||
%type <i> bgp_nh
|
||||
%type <i32> bgp_afi
|
||||
@@ -217,7 +217,7 @@ bgp_proto:
|
||||
| bgp_proto LOCAL ROLE bgp_role_name ';' { BGP_CFG->local_role = $4; }
|
||||
| bgp_proto REQUIRE ROLES bool ';' { BGP_CFG->require_roles = $4; }
|
||||
| bgp_proto SEND HOLD TIME expr';' { BGP_CFG->send_hold_time = $5; }
|
||||
| bgp_proto DISABLE LISTENING ';' { BGP_CFG->disable_listening = 1; }
|
||||
| bgp_proto DISABLE RX bool ';' { BGP_CFG->disable_rx = $4; }
|
||||
;
|
||||
|
||||
bgp_afi:
|
||||
|
||||
@@ -2591,6 +2591,7 @@ done:
|
||||
BGP_TRACE_RL(&rl_snd_update, D_PACKETS, "Sending UPDATE");
|
||||
p->stats.tx_updates++;
|
||||
lp_restore(tmp_linpool, &tmpp);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user