diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-12-21 11:50:42 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-12-21 11:50:42 +0100 |
commit | fbcb7d5faf419057ccbe2340f3714f8885495c51 (patch) | |
tree | 991edff58eef00f3897cafabe93418403aaa3720 /proto/bgp | |
parent | ba9a122142a3d42137c129fabaef097702d44801 (diff) | |
download | bird-fbcb7d5faf419057ccbe2340f3714f8885495c51.tar bird-fbcb7d5faf419057ccbe2340f3714f8885495c51.zip |
Change default LOCAL_PREF attribute to 100 (suggested value by RFC 4277).
Diffstat (limited to 'proto/bgp')
-rw-r--r-- | proto/bgp/attrs.c | 4 | ||||
-rw-r--r-- | proto/bgp/config.Y | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index a0f1821..5316481 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -871,7 +871,7 @@ bgp_create_attrs(struct bgp_proto *p, rte *e, ea_list **attrs, struct linpool *p else 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 */ } @@ -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 (!(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; diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y index a469b4d..b2061a1 100644 --- a/proto/bgp/config.Y +++ b/proto/bgp/config.Y @@ -44,6 +44,7 @@ bgp_proto_start: proto_start BGP { BGP_CFG->enable_as4 = 1; BGP_CFG->capabilities = 2; BGP_CFG->advertise_ipv4 = 1; + BGP_CFG->default_local_pref = 100; } ; |