Revision 094d2bdb proto/static/static.c

View differences:

proto/static/static.c
67 67

  
68 68
  DBG("Installing static route %I/%d, rtd=%d\n", r->net, r->masklen, r->dest);
69 69
  bzero(&a, sizeof(a));
70
  a.proto = p;
70
  a.src = p->main_source;
71 71
  a.source = (r->dest == RTD_DEVICE) ? RTS_STATIC_DEVICE : RTS_STATIC;
72 72
  a.scope = SCOPE_UNIVERSE;
73 73
  a.cast = RTC_UNICAST;
......
113 113
  e = rte_get_temp(aa);
114 114
  e->net = n;
115 115
  e->pflags = 0;
116
  rte_update(p->table, n, p, p, e);
116
  rte_update(p, n, e);
117 117
  r->installed = 1;
118 118
}
119 119

  
......
127 127

  
128 128
  DBG("Removing static route %I/%d\n", r->net, r->masklen);
129 129
  n = net_find(p->table, r->net, r->masklen);
130
  if (n)
131
    rte_update(p->table, n, p, p, NULL);
130
  rte_update(p, n, NULL);
132 131
  r->installed = 0;
133 132
}
134 133

  
......
367 366

  
368 367
  p->neigh_notify = static_neigh_notify;
369 368
  p->if_notify = static_if_notify;
369

  
370 370
  return p;
371 371
}
372 372

  

Also available in: Unified diff