summaryrefslogtreecommitdiffstats
path: root/proto/static
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-03-26 22:50:43 +0100
committerMartin Mares <mj@ucw.cz>1999-03-26 22:50:43 +0100
commit7dc4827c968053e45bcb7f145e9986eeb20c993b (patch)
tree81363b40e7ed12b7a40d00752680bd694afcdf0d /proto/static
parent7e5f5ffdda7232048c4baf3fdec358afb494a29d (diff)
downloadbird-7dc4827c968053e45bcb7f145e9986eeb20c993b.tar
bird-7dc4827c968053e45bcb7f145e9986eeb20c993b.zip
Added everything protocols need to know about multiple routing tables,
i.e. struct proto now contains field 'table' pointing to routing table the protocol is attached to. Use this instead of &master_table. Modified all protocols except the kernel syncer to use this field.
Diffstat (limited to 'proto/static')
-rw-r--r--proto/static/static.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/static/static.c b/proto/static/static.c
index 873abe3..3a485bf 100644
--- a/proto/static/static.c
+++ b/proto/static/static.c
@@ -37,7 +37,7 @@ static_install(struct proto *p, struct static_route *r, struct iface *ifa)
a.iface = ifa;
aa = rta_lookup(&a);
- n = net_get(&master_table, a.tos, r->net, r->masklen);
+ n = net_get(p->table, a.tos, r->net, r->masklen);
e = rte_get_temp(aa);
e->net = n;
e->pflags = 0;
@@ -50,7 +50,7 @@ static_remove(struct proto *p, struct static_route *r)
net *n;
DBG("Removing static route %I/%d\n", r->net, r->masklen);
- n = net_find(&master_table, 0, r->net, r->masklen);
+ n = net_find(p->table, 0, r->net, r->masklen);
if (n)
rte_update(n, p, NULL);
}