uplink config: Connect uplinks in the order defined in the config file

(instead of the reverse order)
This commit is contained in:
Heikki Hannikainen 2012-09-22 13:31:35 +03:00
parent 00ee1419f6
commit 4d90d46894
1 changed files with 6 additions and 4 deletions

View File

@ -650,10 +650,12 @@ int do_uplink(struct uplink_config_t **lq, int argc, char **argv)
}
}
/* put in the list */
l->next = *lq;
if (l->next)
l->next->prevp = &l->next;
/* put in the end of the list */
while (*lq)
lq = &(*lq)->next;
l->prevp = lq;
l->next = NULL;
*lq = l;
return 0;