Commit bc7ca323 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't check for duplicate buffered updates in buffer_update.

This is no longer needed now that duplicates are checked in flushupdates.
parent 0bd8fc79
...@@ -863,19 +863,11 @@ static void ...@@ -863,19 +863,11 @@ static void
buffer_update(struct network *net, buffer_update(struct network *net,
const unsigned char *prefix, unsigned char plen) const unsigned char *prefix, unsigned char plen)
{ {
int i;
if(update_net && update_net != net) if(update_net && update_net != net)
flushupdates(); flushupdates();
update_net = net; update_net = net;
for(i = 0; i < updates; i++) {
if(buffered_updates[i].plen == plen &&
memcmp(buffered_updates[i].prefix, prefix, 16) == 0)
return;
}
if(updates >= MAX_BUFFERED_UPDATES) if(updates >= MAX_BUFFERED_UPDATES)
flushupdates(); flushupdates();
memcpy(buffered_updates[updates].prefix, prefix, 16); memcpy(buffered_updates[updates].prefix, prefix, 16);
......
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