Commit 906f624e authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Rate-limit the response to wildcard requests.

Nodes send wildcard requests at boot, which allows them to acquire
a full routing table in a timely manner.  Unfortunately, this causes
an update storm when a large network boots.
parent 59dd568f
......@@ -452,7 +452,13 @@ parse_packet(const unsigned char *from, struct interface *ifp,
/* If a neighbour is requesting a full route dump from us,
we might as well send it an IHU. */
send_ihu(neigh, NULL);
send_update(neigh->ifp, 0, NULL, 0);
/* Since nodes send wildcard requests on boot, booting
a large number of nodes at the same time may cause an
update storm. Ignore a wildcard request that happens
shortly after we sent a full update. */
if(neigh->ifp->last_update_time <
now.tv_sec - MAX(neigh->ifp->hello_interval / 100, 1))
send_update(neigh->ifp, 0, NULL, 0);
} else {
send_update(neigh->ifp, 0, prefix, plen);
}
......
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