Commit 2d507e64 authored by Ondřej Zajíček's avatar Ondřej Zajíček

Do not allow gateway routes with NULL iface.

parent 54fe0d92
......@@ -339,7 +339,10 @@ krt_read_rt(struct ks_msg *msg, struct krt_proto *p, int scan)
if (ng && ng->scope)
a.iface = ng->iface;
else
log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", igate, net->n.prefix, net->n.pxlen);
{
log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen);
return;
}
a.dest = RTD_ROUTER;
a.gw = igate;
......
......@@ -103,8 +103,10 @@ krt_parse_entry(byte *ent, struct krt_proto *p)
if (ng && ng->scope)
a.iface = ng->iface;
else
/* FIXME: Remove this warning? Handle it somehow... */
log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", gw, net->n.prefix, net->n.pxlen);
{
log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen);
return;
}
a.dest = RTD_ROUTER;
a.gw = gw;
}
......
......@@ -686,8 +686,10 @@ nl_parse_route(struct nlmsghdr *h, int scan)
if (ng && ng->scope)
ra.iface = ng->iface;
else
/* FIXME: Remove this warning? Handle it somehow... */
log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen);
{
log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen);
return;
}
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment