mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 12:48:43 +00:00
Change default LOCAL_PREF attribute to 100 (suggested value by RFC 4277).
This commit is contained in:
parent
ba9a122142
commit
fbcb7d5faf
@ -1043,9 +1043,12 @@ for each neighbor using the following configuration parameters:
|
|||||||
Discriminator to be used during route selection when the MED attribute
|
Discriminator to be used during route selection when the MED attribute
|
||||||
is missing. Default: 0.
|
is missing. Default: 0.
|
||||||
|
|
||||||
<tag>default bgp_local_pref <m/number/</tag> Value of the Local Preference
|
<tag>default bgp_local_pref <m/number/</tag> A default value
|
||||||
to be used during route selection when the Local Preference attribute
|
for the Local Preference attribute. It is used when a new
|
||||||
is missing. Default: 0.
|
Local Preference attribute is attached to a route by the BGP
|
||||||
|
protocol itself (for example, if a route is received through
|
||||||
|
eBGP and therefore does not have such attribute). Default: 100
|
||||||
|
(0 in pre-1.2.0 versions of BIRD).
|
||||||
</descrip>
|
</descrip>
|
||||||
|
|
||||||
<sect1>Attributes
|
<sect1>Attributes
|
||||||
|
@ -871,7 +871,7 @@ bgp_create_attrs(struct bgp_proto *p, rte *e, ea_list **attrs, struct linpool *p
|
|||||||
else
|
else
|
||||||
set_next_hop(z, rta->gw);
|
set_next_hop(z, rta->gw);
|
||||||
|
|
||||||
bgp_set_attr(ea->attrs+3, BA_LOCAL_PREF, 0);
|
bgp_set_attr(ea->attrs+3, BA_LOCAL_PREF, p->cf->default_local_pref);
|
||||||
|
|
||||||
return 0; /* Leave decision to the filters */
|
return 0; /* Leave decision to the filters */
|
||||||
}
|
}
|
||||||
@ -1421,7 +1421,7 @@ bgp_decode_attrs(struct bgp_conn *conn, byte *attr, unsigned int len, struct lin
|
|||||||
|
|
||||||
/* If there's no local preference, define one */
|
/* If there's no local preference, define one */
|
||||||
if (!(seen[0] & (1 << BA_LOCAL_PREF)))
|
if (!(seen[0] & (1 << BA_LOCAL_PREF)))
|
||||||
bgp_attach_attr(&a->eattrs, pool, BA_LOCAL_PREF, 0);
|
bgp_attach_attr(&a->eattrs, pool, BA_LOCAL_PREF, bgp->cf->default_local_pref);
|
||||||
|
|
||||||
return a;
|
return a;
|
||||||
|
|
||||||
|
@ -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->default_local_pref = 100;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user