mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
Changes 'ignore communities' to 'interpret communities'.
This commit is contained in:
parent
6cb8f742f1
commit
41677025ee
@ -996,16 +996,17 @@ for each neighbor using the following configuration parameters:
|
|||||||
capability and accepts such requests. Even when disabled, BIRD
|
capability and accepts such requests. Even when disabled, BIRD
|
||||||
can send route refresh requests. Default: on.
|
can send route refresh requests. Default: on.
|
||||||
|
|
||||||
<tag>ignore communities <m/switch/</tag> RFC 1997 demands that
|
<tag>interpret communities <m/switch/</tag> RFC 1997 demands
|
||||||
BGP speaker should process well-known communities like
|
that BGP speaker should process well-known communities like
|
||||||
no-export (65535, 65281) or no-advertise (65535, 65282). For
|
no-export (65535, 65281) or no-advertise (65535, 65282). For
|
||||||
example, received route carrying a no-adverise community
|
example, received route carrying a no-adverise community
|
||||||
should not be advertised to any of its neighbors. BIRD has
|
should not be advertised to any of its neighbors. If this
|
||||||
such behavior hardwired (it is evaluated when a route is
|
option is enabled (which is by default), BIRD has such
|
||||||
exported to the protocol just before the export filter). This
|
behavior automatically (it is evaluated when a route is
|
||||||
option allows to disable such hardwired processing of
|
exported to the protocol just before the export filter).
|
||||||
well-known communities (in that case, similar behavior can be
|
Otherwise, this integrated processing of well-known
|
||||||
implemented in the export filter). Default: off.
|
communities is disabled. In that case, similar behavior can be
|
||||||
|
implemented in the export filter. Default: on.
|
||||||
|
|
||||||
<tag>enable as4 <m/switch/</tag> BGP protocol was designed to use 2B AS numbers
|
<tag>enable as4 <m/switch/</tag> BGP protocol was designed to use 2B AS numbers
|
||||||
and was extended later to allow 4B AS number. BIRD supports 4B AS extension,
|
and was extended later to allow 4B AS number. BIRD supports 4B AS extension,
|
||||||
|
@ -976,7 +976,7 @@ bgp_import_control(struct proto *P, rte **new, ea_list **attrs, struct linpool *
|
|||||||
if (bgp_cluster_list_loopy(p, e->attrs))
|
if (bgp_cluster_list_loopy(p, e->attrs))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!p->cf->ignore_communities && bgp_community_filter(p, e))
|
if (p->cf->interpret_communities && bgp_community_filter(p, e))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (p->local_as == new_bgp->local_as && p->is_internal && new_bgp->is_internal)
|
if (p->local_as == new_bgp->local_as && p->is_internal && new_bgp->is_internal)
|
||||||
|
@ -37,7 +37,7 @@ struct bgp_config {
|
|||||||
int advertise_ipv4; /* Whether we should add IPv4 capability advertisement to OPEN message */
|
int advertise_ipv4; /* Whether we should add IPv4 capability advertisement to OPEN message */
|
||||||
u32 route_limit; /* Number of routes that may be imported, 0 means disable limit */
|
u32 route_limit; /* Number of routes that may be imported, 0 means disable limit */
|
||||||
int passive; /* Do not initiate outgoing connection */
|
int passive; /* Do not initiate outgoing connection */
|
||||||
int ignore_communities; /* Skip hardwired handling of well-known communities */
|
int interpret_communities; /* Hardwired handling of well-known communities */
|
||||||
unsigned connect_retry_time;
|
unsigned connect_retry_time;
|
||||||
unsigned hold_time, initial_hold_time;
|
unsigned hold_time, initial_hold_time;
|
||||||
unsigned keepalive_time;
|
unsigned keepalive_time;
|
||||||
|
@ -23,7 +23,7 @@ CF_KEYWORDS(BGP, LOCAL, NEIGHBOR, AS, HOLD, TIME, CONNECT, RETRY, KEEPALIVE,
|
|||||||
BGP_ATOMIC_AGGR, BGP_AGGREGATOR, BGP_COMMUNITY, SOURCE, ADDRESS,
|
BGP_ATOMIC_AGGR, BGP_AGGREGATOR, BGP_COMMUNITY, SOURCE, ADDRESS,
|
||||||
PASSWORD, RR, RS, CLIENT, CLUSTER, ID, AS4, ADVERTISE, IPV4,
|
PASSWORD, RR, RS, CLIENT, CLUSTER, ID, AS4, ADVERTISE, IPV4,
|
||||||
CAPABILITIES, LIMIT, PASSIVE, PREFER, OLDER, MISSING, LLADDR,
|
CAPABILITIES, LIMIT, PASSIVE, PREFER, OLDER, MISSING, LLADDR,
|
||||||
DROP, IGNORE, ROUTE, REFRESH, COMMUNITIES)
|
DROP, IGNORE, ROUTE, REFRESH, INTERPRET, COMMUNITIES)
|
||||||
|
|
||||||
CF_GRAMMAR
|
CF_GRAMMAR
|
||||||
|
|
||||||
@ -44,6 +44,7 @@ bgp_proto_start: proto_start BGP {
|
|||||||
BGP_CFG->enable_as4 = 1;
|
BGP_CFG->enable_as4 = 1;
|
||||||
BGP_CFG->capabilities = 2;
|
BGP_CFG->capabilities = 2;
|
||||||
BGP_CFG->advertise_ipv4 = 1;
|
BGP_CFG->advertise_ipv4 = 1;
|
||||||
|
BGP_CFG->interpret_communities = 1;
|
||||||
BGP_CFG->default_local_pref = 100;
|
BGP_CFG->default_local_pref = 100;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -86,7 +87,7 @@ bgp_proto:
|
|||||||
| bgp_proto PASSWORD TEXT ';' { BGP_CFG->password = $3; }
|
| bgp_proto PASSWORD TEXT ';' { BGP_CFG->password = $3; }
|
||||||
| bgp_proto ROUTE LIMIT expr ';' { BGP_CFG->route_limit = $4; }
|
| bgp_proto ROUTE LIMIT expr ';' { BGP_CFG->route_limit = $4; }
|
||||||
| bgp_proto PASSIVE bool ';' { BGP_CFG->passive = $3; }
|
| bgp_proto PASSIVE bool ';' { BGP_CFG->passive = $3; }
|
||||||
| bgp_proto IGNORE COMMUNITIES bool ';' { BGP_CFG->ignore_communities = $4; }
|
| bgp_proto INTERPRET COMMUNITIES bool ';' { BGP_CFG->interpret_communities = $4; }
|
||||||
;
|
;
|
||||||
|
|
||||||
CF_ADDTO(dynamic_attr, BGP_PATH
|
CF_ADDTO(dynamic_attr, BGP_PATH
|
||||||
|
Loading…
Reference in New Issue
Block a user