From bd4b893f778ed57d89f9a019369aa5cb7739edeb Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Tue, 20 Oct 2015 21:54:07 +0000 Subject: [PATCH] Remove BGP's asorig timer, it is no longer used Signed-off-by: Daniel Walton Reviewed-by: Donald Sharp --- bgpd/bgp_fsm.c | 9 --------- bgpd/bgp_snmp.c | 14 ++------------ bgpd/bgpd.c | 3 --- bgpd/bgpd.h | 3 --- 4 files changed, 2 insertions(+), 27 deletions(-) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index bd13e1c4b9..c8605da956 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -143,7 +143,6 @@ peer_xfer_conn(struct peer *from_peer) peer->as = from_peer->as; peer->v_holdtime = from_peer->v_holdtime; peer->v_keepalive = from_peer->v_keepalive; - peer->v_asorig = from_peer->v_asorig; peer->routeadv = from_peer->routeadv; peer->v_routeadv = from_peer->v_routeadv; peer->v_gr_restart = from_peer->v_gr_restart; @@ -236,7 +235,6 @@ bgp_timer_set (struct peer *peer) BGP_TIMER_OFF (peer->t_connect); BGP_TIMER_OFF (peer->t_holdtime); BGP_TIMER_OFF (peer->t_keepalive); - BGP_TIMER_OFF (peer->t_asorig); BGP_TIMER_OFF (peer->t_routeadv); break; @@ -248,7 +246,6 @@ bgp_timer_set (struct peer *peer) BGP_TIMER_ON (peer->t_connect, bgp_connect_timer, peer->v_connect); BGP_TIMER_OFF (peer->t_holdtime); BGP_TIMER_OFF (peer->t_keepalive); - BGP_TIMER_OFF (peer->t_asorig); BGP_TIMER_OFF (peer->t_routeadv); break; @@ -268,7 +265,6 @@ bgp_timer_set (struct peer *peer) } BGP_TIMER_OFF (peer->t_holdtime); BGP_TIMER_OFF (peer->t_keepalive); - BGP_TIMER_OFF (peer->t_asorig); BGP_TIMER_OFF (peer->t_routeadv); break; @@ -286,7 +282,6 @@ bgp_timer_set (struct peer *peer) BGP_TIMER_OFF (peer->t_holdtime); } BGP_TIMER_OFF (peer->t_keepalive); - BGP_TIMER_OFF (peer->t_asorig); BGP_TIMER_OFF (peer->t_routeadv); break; @@ -309,7 +304,6 @@ bgp_timer_set (struct peer *peer) BGP_TIMER_ON (peer->t_keepalive, bgp_keepalive_timer, peer->v_keepalive); } - BGP_TIMER_OFF (peer->t_asorig); BGP_TIMER_OFF (peer->t_routeadv); break; @@ -333,7 +327,6 @@ bgp_timer_set (struct peer *peer) BGP_TIMER_ON (peer->t_keepalive, bgp_keepalive_timer, peer->v_keepalive); } - BGP_TIMER_OFF (peer->t_asorig); break; case Deleted: BGP_TIMER_OFF (peer->t_gr_restart); @@ -344,7 +337,6 @@ bgp_timer_set (struct peer *peer) BGP_TIMER_OFF (peer->t_connect); BGP_TIMER_OFF (peer->t_holdtime); BGP_TIMER_OFF (peer->t_keepalive); - BGP_TIMER_OFF (peer->t_asorig); BGP_TIMER_OFF (peer->t_routeadv); break; } @@ -1072,7 +1064,6 @@ bgp_stop (struct peer *peer) BGP_TIMER_OFF (peer->t_connect); BGP_TIMER_OFF (peer->t_holdtime); BGP_TIMER_OFF (peer->t_keepalive); - BGP_TIMER_OFF (peer->t_asorig); BGP_TIMER_OFF (peer->t_routeadv); /* Stream reset. */ diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index 79aaa03a6e..0d1aa4df84 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -74,9 +74,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #define BGPPEERKEEPALIVE 19 #define BGPPEERHOLDTIMECONFIGURED 20 #define BGPPEERKEEPALIVECONFIGURED 21 -#define BGPPEERMINASORIGINATIONINTERVAL 22 -#define BGPPEERMINROUTEADVERTISEMENTINTERVAL 23 -#define BGPPEERINUPDATEELAPSEDTIME 24 +#define BGPPEERMINROUTEADVERTISEMENTINTERVAL 22 +#define BGPPEERINUPDATEELAPSEDTIME 23 /* BGP MIB bgpIdentifier. */ #define BGPIDENTIFIER 0 @@ -189,8 +188,6 @@ struct variable bgp_variables[] = 3, {3, 1, 20}}, {BGPPEERKEEPALIVECONFIGURED, INTEGER, RWRITE, bgpPeerTable, 3, {3, 1, 21}}, - {BGPPEERMINASORIGINATIONINTERVAL, INTEGER, RWRITE, bgpPeerTable, - 3, {3, 1, 22}}, {BGPPEERMINROUTEADVERTISEMENTINTERVAL, INTEGER, RWRITE, bgpPeerTable, 3, {3, 1, 23}}, {BGPPEERINUPDATEELAPSEDTIME, GAUGE32, RONLY, bgpPeerTable, @@ -438,9 +435,6 @@ write_bgpPeerTable (int action, u_char *var_val, peer->keepalive = intval; peer->v_keepalive = intval; break; - case BGPPEERMINASORIGINATIONINTERVAL: - peer->v_asorig = intval; - break; case BGPPEERMINROUTEADVERTISEMENTINTERVAL: peer->v_routeadv = intval; break; @@ -569,10 +563,6 @@ bgpPeerTable (struct variable *v, oid name[], size_t *length, else return SNMP_INTEGER (peer->v_keepalive); break; - case BGPPEERMINASORIGINATIONINTERVAL: - *write_method = write_bgpPeerTable; - return SNMP_INTEGER (peer->v_asorig); - break; case BGPPEERMINROUTEADVERTISEMENTINTERVAL: *write_method = write_bgpPeerTable; return SNMP_INTEGER (peer->v_routeadv); diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 8ba772be1b..43ef429e4a 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -822,7 +822,6 @@ peer_global_config_reset (struct peer *peer) /* Reset some other configs back to defaults. */ peer->v_start = BGP_INIT_START_TIMER; - peer->v_asorig = BGP_DEFAULT_ASORIGINATE; peer->password = NULL; peer->local_id = peer->bgp->router_id; peer->v_holdtime = peer->bgp->default_holdtime; @@ -1029,7 +1028,6 @@ peer_new (struct bgp *bgp) peer->fd = -1; peer->v_start = BGP_INIT_START_TIMER; peer->v_connect = BGP_DEFAULT_CONNECT_RETRY; - peer->v_asorig = BGP_DEFAULT_ASORIGINATE; peer->status = Idle; peer->ostatus = Idle; peer->cur_event = peer->last_event = peer->last_major_event = 0; @@ -1119,7 +1117,6 @@ peer_xfer_config (struct peer *peer_dst, struct peer *peer_src) peer_dst->connect = peer_src->connect; peer_dst->v_holdtime = peer_src->v_holdtime; peer_dst->v_keepalive = peer_src->v_keepalive; - peer_dst->v_asorig = peer_src->v_asorig; peer_dst->routeadv = peer_src->routeadv; peer_dst->v_routeadv = peer_src->v_routeadv; diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 133cd3876e..b11e6f0723 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -695,7 +695,6 @@ struct peer u_int32_t v_connect; u_int32_t v_holdtime; u_int32_t v_keepalive; - u_int32_t v_asorig; u_int32_t v_routeadv; u_int32_t v_pmax_restart; u_int32_t v_gr_restart; @@ -707,7 +706,6 @@ struct peer struct thread *t_connect; struct thread *t_holdtime; struct thread *t_keepalive; - struct thread *t_asorig; struct thread *t_routeadv; struct thread *t_pmax_restart; struct thread *t_gr_restart; @@ -999,7 +997,6 @@ struct bgp_nlri #define BGP_ERROR_START_TIMER 30 #define BGP_DEFAULT_HOLDTIME 180 #define BGP_DEFAULT_KEEPALIVE 60 -#define BGP_DEFAULT_ASORIGINATE 15 #define BGP_DEFAULT_EBGP_ROUTEADV 0 #define BGP_DEFAULT_IBGP_ROUTEADV 0 #define BGP_DEFAULT_CONNECT_RETRY 10 -- 2.39.5