From abc920f85ea2e2e42c6cf1df7c14373ec1226d20 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 17:40:42 -0700 Subject: bgpd-maxmed-administrative-onstartup.patch COMMAND: Possible forms of the command configuration: [no] bgp max-med administrative [no] bgp max-med administrative [no] bgp max-med on-startup [no] bgp max-med on-startup DESCRIPTION: 'administrative' takes effect from the time of the config until the config is removed. 'on-startup' is effective only at the startup time for the given '' after the first peer is established. '' is used as the MED value to be sent out when the max-med is effective. Default max-med value is 4294967294. NOTE: When max-med is active, MED is changed only in the outgoing attributes to the peers, it doesn't modify any MED specific state of the attributes in BGP on the local node. Signed-off-by: Vipin Kumar Reviewed-by: Daniel Walton --- bgpd/bgpd.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'bgpd/bgpd.h') diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index f1fe586a2..7cd43cf5a 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -111,7 +111,21 @@ struct bgp as_t *confed_peers; int confed_peers_cnt; - struct thread *t_startup; + struct thread *t_startup; /* start-up timer on only once at the beginning */ + + u_int32_t v_maxmed_onstartup; /* Duration of max-med on start-up */ +#define BGP_MAXMED_ONSTARTUP_UNCONFIGURED 0 /* 0 means off, its the default */ + u_int32_t maxmed_onstartup_value; /* Max-med value when active on start-up */ + struct thread *t_maxmed_onstartup; /* non-null when max-med onstartup is on */ + u_char maxmed_onstartup_over; /* Flag to make it effective only once */ + + u_char v_maxmed_admin; /* 1/0 if max-med administrative is on/off */ +#define BGP_MAXMED_ADMIN_UNCONFIGURED 0 /* Off by default */ + u_int32_t maxmed_admin_value; /* Max-med value when administrative in on */ +#define BGP_MAXMED_VALUE_DEFAULT 4294967294 /* Maximum by default */ + + u_char maxmed_active; /* 1/0 if max-med is active or not */ + u_int32_t maxmed_value; /* Max-med value when its active */ /* BGP update delay on startup */ struct thread *t_update_delay; -- cgit v1.2.3