From 094d2bdb79e1ffa0a02761fd651aa0f0b6b0c585 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 14 Aug 2012 16:25:22 +0200 Subject: Implements ADD-PATH extension for BGP. Allows to send and receive multiple routes for one network by one BGP session. Also contains necessary core changes to support this (routing tables accepting several routes for one network from one protocol). It needs some more cleanup before merging to the master branch. --- proto/static/static.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'proto/static/static.c') diff --git a/proto/static/static.c b/proto/static/static.c index 6a027f50..b6c8948f 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -67,7 +67,7 @@ static_install(struct proto *p, struct static_route *r, struct iface *ifa) DBG("Installing static route %I/%d, rtd=%d\n", r->net, r->masklen, r->dest); bzero(&a, sizeof(a)); - a.proto = p; + a.src = p->main_source; a.source = (r->dest == RTD_DEVICE) ? RTS_STATIC_DEVICE : RTS_STATIC; a.scope = SCOPE_UNIVERSE; a.cast = RTC_UNICAST; @@ -113,7 +113,7 @@ static_install(struct proto *p, struct static_route *r, struct iface *ifa) e = rte_get_temp(aa); e->net = n; e->pflags = 0; - rte_update(p->table, n, p, p, e); + rte_update(p, n, e); r->installed = 1; } @@ -127,8 +127,7 @@ static_remove(struct proto *p, struct static_route *r) DBG("Removing static route %I/%d\n", r->net, r->masklen); n = net_find(p->table, r->net, r->masklen); - if (n) - rte_update(p->table, n, p, p, NULL); + rte_update(p, n, NULL); r->installed = 0; } @@ -367,6 +366,7 @@ static_init(struct proto_config *c) p->neigh_notify = static_neigh_notify; p->if_notify = static_if_notify; + return p; } -- cgit v1.2.3