Skip to content

Commit

Permalink
Rate-limit the response to wildcard requests.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jech committed Dec 8, 2011
1 parent 59dd568 commit 906f624
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion message.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 906f624

Please sign in to comment.