From 906f624ef208ecda54084d61196c89bf00bf5edb Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Thu, 8 Dec 2011 19:39:01 +0100 Subject: [PATCH] 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. --- message.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/message.c b/message.c index 19278027..50fdeb48 100644 --- a/message.c +++ b/message.c @@ -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); }