summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2012-04-15 15:07:58 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2012-04-15 15:07:58 +0200
commit00a09f3c367e79297f827b52ec5f16842db1ac4e (patch)
treea8744e176e5b2852cddd82f3b99d98711ec10074 /proto/bgp/bgp.c
parentbf2abe2f515d7b7aaed5fb4f37af82169adcd2f2 (diff)
Implement RA_ACCEPTED mode of route propagation.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 4dd4b7be..099a39a9 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -909,7 +909,7 @@ bgp_init(struct proto_config *C)
struct proto *P = proto_new(C, sizeof(struct bgp_proto));
struct bgp_proto *p = (struct bgp_proto *) P;
- P->accept_ra_types = RA_OPTIMAL;
+ P->accept_ra_types = c->secondary ? RA_ACCEPTED : RA_OPTIMAL;
P->rt_notify = bgp_rt_notify;
P->rte_better = bgp_rte_better;
P->import_control = bgp_import_control;
@@ -955,12 +955,14 @@ bgp_check_config(struct bgp_config *c)
if (internal && c->rs_client)
cf_error("Only external neighbor can be RS client");
+ /*
if (c->multihop && (c->gw_mode == GW_DIRECT))
cf_error("Multihop BGP cannot use direct gateway mode");
if (c->multihop && (ipa_has_link_scope(c->remote_ip) ||
ipa_has_link_scope(c->source_addr)))
cf_error("Multihop BGP cannot be used with link-local addresses");
+ */
/* Different default based on rs_client */
if (!c->missing_lladdr)
@@ -968,7 +970,8 @@ bgp_check_config(struct bgp_config *c)
/* Different default for gw_mode */
if (!c->gw_mode)
- c->gw_mode = (c->multihop || internal) ? GW_RECURSIVE : GW_DIRECT;
+ // c->gw_mode = (c->multihop || internal) ? GW_RECURSIVE : GW_DIRECT;
+ c->gw_mode = GW_DIRECT;
}
static int