summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
Diffstat (limited to 'nest')
-rw-r--r--nest/iface.c32
-rw-r--r--nest/iface.h2
-rw-r--r--nest/neighbor.c6
3 files changed, 20 insertions, 20 deletions
diff --git a/nest/iface.c b/nest/iface.c
index bd2bb39a..61b99a91 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -36,7 +36,7 @@
static pool *if_pool;
-list iface_list;
+list global_iface_list;
struct iface default_vrf;
static void if_recalc_preferred(struct iface *i);
@@ -111,7 +111,7 @@ if_dump_all(void)
struct iface *i;
debug("Known network interfaces:\n");
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
if_dump(i);
debug("Router ID: %08x\n", config->router_id);
}
@@ -307,7 +307,7 @@ if_update(struct iface *new)
if (!new->master)
new->master = &default_vrf;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
if (!strcmp(new->name, i->name))
{
new->flags = if_recalc_flags(new, new->flags);
@@ -340,7 +340,7 @@ if_update(struct iface *new)
newif:
init_list(&i->neighbors);
i->flags |= IF_UPDATED | IF_TMP_DOWN; /* Tmp down as we don't have addresses yet */
- add_tail(&iface_list, &i->n);
+ add_tail(&global_iface_list, &i->n);
return i;
}
@@ -350,7 +350,7 @@ if_start_update(void)
struct iface *i;
struct ifa *a;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
{
i->flags &= ~IF_UPDATED;
WALK_LIST(a, i->addrs)
@@ -374,7 +374,7 @@ if_end_update(void)
struct iface *i;
struct ifa *a, *b;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
{
if (!(i->flags & IF_UPDATED))
if_change_flags(i, (i->flags & ~IF_ADMIN_UP) | IF_SHUTDOWN);
@@ -413,7 +413,7 @@ if_feed_baby(struct proto *p)
if (!p->if_notify && !p->ifa_notify) /* shortcut */
return;
DBG("Announcing interfaces to new protocol %s\n", p->name);
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
{
if_send_notify(p, IF_CHANGE_CREATE | ((i->flags & IF_UP) ? IF_CHANGE_UP : 0), i);
if (i->flags & IF_UP)
@@ -435,7 +435,7 @@ if_find_by_index(unsigned idx)
{
struct iface *i;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
if (i->index == idx && !(i->flags & IF_SHUTDOWN))
return i;
return NULL;
@@ -454,7 +454,7 @@ if_find_by_name(const char *name)
{
struct iface *i;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
if (!strcmp(i->name, name) && !(i->flags & IF_SHUTDOWN))
return i;
return NULL;
@@ -465,7 +465,7 @@ if_get_by_name(const char *name)
{
struct iface *i;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
if (!strcmp(i->name, name))
return i;
@@ -475,7 +475,7 @@ if_get_by_name(const char *name)
i->flags = IF_SHUTDOWN;
init_list(&i->addrs);
init_list(&i->neighbors);
- add_tail(&iface_list, &i->n);
+ add_tail(&global_iface_list, &i->n);
return i;
}
@@ -561,7 +561,7 @@ if_recalc_all_preferred_addresses(void)
{
struct iface *i;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
{
if_recalc_preferred(i);
@@ -669,7 +669,7 @@ if_choose_router_id(struct iface_patt *mask, u32 old_id)
struct ifa *a, *b;
b = NULL;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
{
if (!(i->flags & IF_ADMIN_UP) ||
(i->flags & IF_SHUTDOWN))
@@ -716,7 +716,7 @@ void
if_init(void)
{
if_pool = rp_new(&root_pool, &main_birdloop, "Interfaces");
- init_list(&iface_list);
+ init_list(&global_iface_list);
strcpy(default_vrf.name, "default");
neigh_init(if_pool);
}
@@ -844,7 +844,7 @@ if_show(void)
struct ifa *a;
char *type;
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
{
if (i->flags & IF_SHUTDOWN)
continue;
@@ -887,7 +887,7 @@ if_show_summary(void)
struct iface *i;
cli_msg(-2005, "%-10s %-6s %-18s %s", "Interface", "State", "IPv4 address", "IPv6 address");
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
{
byte a4[IPA_MAX_TEXT_LENGTH + 17];
byte a6[IPA_MAX_TEXT_LENGTH + 17];
diff --git a/nest/iface.h b/nest/iface.h
index 13f3bd12..b3dcc408 100644
--- a/nest/iface.h
+++ b/nest/iface.h
@@ -12,7 +12,7 @@
#include "lib/lists.h"
#include "lib/ip.h"
-extern list iface_list;
+extern list global_iface_list;
struct proto;
struct pool;
diff --git a/nest/neighbor.c b/nest/neighbor.c
index e10413bd..50defb96 100644
--- a/nest/neighbor.c
+++ b/nest/neighbor.c
@@ -152,7 +152,7 @@ if_connected_any(ip_addr a, struct iface *vrf, struct iface **iface, struct ifa
*addr = NULL;
/* Prefer SCOPE_HOST or longer prefix */
- WALK_LIST(i, iface_list)
+ WALK_LIST(i, global_iface_list)
if ((!vrf || vrf == i->master) && ((s = if_connected(a, i, &b, flags)) >= 0))
if (scope_better(s, scope) || (scope_remote(s, scope) && ifa_better(b, *addr)))
{
@@ -440,7 +440,7 @@ neigh_if_up(struct iface *i)
node *x, *y;
/* Update neighbors that might be better off with the new iface */
- WALK_LIST(ii, iface_list)
+ WALK_LIST(ii, global_iface_list)
if (!EMPTY_LIST(ii->neighbors) && (ii != i) && if_intersect(i, ii))
WALK_LIST2_DELSAFE(n, x, y, ii->neighbors, if_n)
neigh_update(n, i);
@@ -502,7 +502,7 @@ neigh_ifa_up(struct ifa *a)
node *x, *y;
/* Update neighbors that might be better off with the new ifa */
- WALK_LIST(ii, iface_list)
+ WALK_LIST(ii, global_iface_list)
if (!EMPTY_LIST(ii->neighbors) && ifa_intersect(a, ii))
WALK_LIST2_DELSAFE(n, x, y, ii->neighbors, if_n)
neigh_update(n, i);