diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-12-10 22:30:46 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-12-10 22:30:46 +0100 |
commit | 6601a14831cdd32fc671ebc9dc299d2be427e489 (patch) | |
tree | 00b89854e36fbecd17443d09587c7cd80352893f /proto/static/static.c | |
parent | 2d0b7e24a52d51904faa8a8e96d68863491c110a (diff) | |
parent | 283c7dfada53a6dee6a8a17ecab492ffafd44b66 (diff) |
Merge branch 'add-path'
Diffstat (limited to 'proto/static/static.c')
-rw-r--r-- | proto/static/static.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/static/static.c b/proto/static/static.c index 9eee820d..9b115acd 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; } |