Revision 9a158361 proto/static/static.c

View differences:

proto/static/static.c
134 134
}
135 135

  
136 136
static void
137
static_if_notify(struct proto *p, unsigned flags, struct iface *new, struct iface *old)
137
static_if_notify(struct proto *p, unsigned flags, struct iface *i)
138 138
{
139 139
  struct static_route *r;
140 140
  struct static_config *c = (void *) p->cf;
......
142 142
  if (flags & IF_CHANGE_UP)
143 143
    {
144 144
      WALK_LIST(r, c->iface_routes)
145
	if (!strcmp(r->if_name, new->name))
146
	  static_install(p, r, new);
145
	if (!strcmp(r->if_name, i->name))
146
	  static_install(p, r, i);
147 147
    }
148 148
  else if (flags & IF_CHANGE_DOWN)
149 149
    {
150 150
      WALK_LIST(r, c->iface_routes)
151
	if (!strcmp(r->if_name, old->name))
151
	if (!strcmp(r->if_name, i->name))
152 152
	  static_remove(p, r);
153 153
    }
154 154
}

Also available in: Unified diff