Commit 2d9bff92 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Only check for interface characterics when upping, not when downing.

This avoids warnings about being unable to determine things about
nonexistent interfaces.
parent a0240d73
......@@ -363,9 +363,22 @@ interface_up(struct interface *ifp, int up)
ifp->numll = rc;
}
}
check_interface_channel(ifp);
update_interface_metric(ifp);
rc = check_interface_ipv4(ifp);
debugf("Upped interface %s (%s, cost=%d, channel=%d%s).\n",
ifp->name,
(ifp->flags & IF_WIRED) ? "wired" : "wireless",
ifp->cost,
ifp->channel,
ifp->ipv4 ? ", IPv4" : "");
set_timeout(&ifp->hello_timeout, ifp->hello_interval);
set_timeout(&ifp->update_timeout, ifp->update_interval);
send_hello(ifp);
if(rc > 0)
send_update(ifp, 0, NULL, 0);
send_request(ifp, NULL, 0);
} else {
flush_interface_routes(ifp, 0);
......@@ -394,20 +407,6 @@ interface_up(struct interface *ifp, int up)
ifp->numll = 0;
}
check_interface_channel(ifp);
update_interface_metric(ifp);
rc = check_interface_ipv4(ifp);
debugf("Upped interface %s (%s, cost=%d, channel=%d%s).\n",
ifp->name,
(ifp->flags & IF_WIRED) ? "wired" : "wireless",
ifp->cost,
ifp->channel,
ifp->ipv4 ? ", IPv4" : "");
if(up && rc > 0)
send_update(ifp, 0, NULL, 0);
return 1;
}
......
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