Revision 84cac51a proto/static/static.c

View differences:

proto/static/static.c
81 81
    {
82 82
      struct static_route *r2;
83 83
      struct mpnh *nhs = NULL;
84
      struct mpnh **nhp = &nhs;
85 84

  
86 85
      for (r2 = r->mp_next; r2; r2 = r2->mp_next)
87 86
	if (r2->installed)
......
90 89
	    nh->gw = r2->via;
91 90
	    nh->iface = r2->neigh->iface;
92 91
	    nh->weight = r2->masklen; /* really */
93
	    nh->next = NULL;
94
	    *nhp = nh;
95
	    nhp = &(nh->next);
92
	    mpnh_insert(&nhs, nh);
96 93
	  }
97 94

  
98 95
      /* There is at least one nexthop */

Also available in: Unified diff