summaryrefslogtreecommitdiff
path: root/sysdep/unix/krt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r--sysdep/unix/krt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 2128e136..6c0e5e91 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -581,7 +581,7 @@ krt_flush_routes(struct krt_proto *p)
{
net *n = (net *) f;
rte *e = n->routes;
- if (e && (n->n.flags & KRF_INSTALLED))
+ if (rte_is_valid(e) && (n->n.flags & KRF_INSTALLED))
{
/* FIXME: this does not work if gw is changed in export filter */
krt_replace_rte(p, e->net, NULL, e, NULL);
@@ -656,7 +656,7 @@ krt_got_route(struct krt_proto *p, rte *e)
}
old = net->routes;
- if ((net->n.flags & KRF_INSTALLED) && old)
+ if ((net->n.flags & KRF_INSTALLED) && rte_is_valid(old))
{
/* There may be changes in route attributes, we ignore that.
Also, this does not work well if gw is changed in export filter */