static void
static_install(struct proto *p, struct static_route *r, struct iface *ifa)
{
- if (r->installed)
- net *n;
- rta a, *aa;
- rte *e;
-
+ if (r->installed > 0)
return;
DBG("Installing static route %I/%d, rtd=%d\n", r->net, r->masklen, r->dest);
if (!r->installed)
return;
- DBG("Removing static route %I/%d\n", r->net, r->masklen);
+ DBG("Removing static route %I/%d via %I\n", r->net, r->masklen, r->via);
- n = net_find(p->table, r->net, r->masklen);
+
+ // int pxlen = r->masklen + (ipa_is_ip4(r->net) ? 96 : 0); // XXXX: Hack
+ net *n = net_find(p->table, r->net, r->masklen);
rte_update(p, n, NULL);
r->installed = 0;
}