summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index e61e9f20..85d42beb 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -85,6 +85,8 @@ rte_get_temp(rta *a)
static int /* Actually better or at least as good as */
rte_better(rte *new, rte *old)
{
+ int (*better)(rte *, rte *);
+
if (!old)
return 1;
if (new->pref > old->pref)
@@ -96,7 +98,9 @@ rte_better(rte *new, rte *old)
/* FIXME!!! */
die("Different protocols, but identical preferences => oops");
}
- return new->attrs->proto->rte_better(new, old);
+ if (better = new->attrs->proto->rte_better)
+ return better(new, old);
+ return 0;
}
void
@@ -106,7 +110,8 @@ rte_announce(rte *new, rte *old)
WALK_LIST(p, proto_list)
if (!new || new->attrs->proto != p)
- p->rt_notify(p, new, old);
+ if (p->rt_notify)
+ p->rt_notify(p, new, old);
}
static inline void