Revision 600998fc proto/rip/rip.c

View differences:

proto/rip/rip.c
823 823
  FIB_ITERATE_INIT(&fit, &p->rtable);
824 824

  
825 825
  loop:
826
  FIB_ITERATE_START(&p->rtable, &fit, node)
826
  FIB_ITERATE_START(&p->rtable, &fit, struct rip_entry, en)
827 827
  {
828
    struct rip_entry *en = (struct rip_entry *) node;
829 828
    struct rip_rte *rt, **rp;
830 829
    int changed = 0;
831 830

  
......
852 851
       * rip_rt_notify() -> p->rtable change, invalidating hidden variables.
853 852
       */
854 853

  
855
      FIB_ITERATE_PUT_NEXT(&fit, &p->rtable, node);
854
      FIB_ITERATE_PUT_NEXT(&fit, &p->rtable);
856 855
      rip_announce_rte(p, en);
857 856
      goto loop;
858 857
    }
......
874 873
    /* Remove empty nodes */
875 874
    if (!en->valid && !en->routes)
876 875
    {
877
      FIB_ITERATE_PUT(&fit, node);
878
      fib_delete(&p->rtable, node);
876
      FIB_ITERATE_PUT(&fit);
877
      fib_delete(&p->rtable, en);
879 878
      goto loop;
880 879
    }
881 880
  }
882
  FIB_ITERATE_END(node);
881
  FIB_ITERATE_END;
883 882

  
884 883
  p->rt_reload = 0;
885 884

  
......
1248 1247
  int i;
1249 1248

  
1250 1249
  i = 0;
1251
  FIB_WALK(&p->rtable, e)
1250
  FIB_WALK(&p->rtable, struct rip_entry, en)
1252 1251
  {
1253
    struct rip_entry *en = (struct rip_entry *) e;
1254 1252
    debug("RIP: entry #%d: %N via %I dev %s valid %d metric %d age %d s\n",
1255 1253
	  i++, en->n.addr, en->next_hop, en->iface->name,
1256 1254
	  en->valid, en->metric, now - en->changed);

Also available in: Unified diff