Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188158
b: refs/heads/master
c: 858a18a
h: refs/heads/master
v: v3
  • Loading branch information
Vitaliy Gusev authored and David S. Miller committed Mar 16, 2010
1 parent c42e937 commit 3d39269
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8440853bb70010f2f8edc26cb0f7af60da8b2c5a
refs/heads/master: 858a18a6a2f74e8f0e5b2e9671d4b74694aba708
16 changes: 6 additions & 10 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,8 @@ static void rt_secret_rebuild_oneshot(struct net *net)
{
del_timer_sync(&net->ipv4.rt_secret_timer);
rt_cache_invalidate(net);
if (ip_rt_secret_interval) {
net->ipv4.rt_secret_timer.expires += ip_rt_secret_interval;
add_timer(&net->ipv4.rt_secret_timer);
}
if (ip_rt_secret_interval)
mod_timer(&net->ipv4.rt_secret_timer, jiffies + ip_rt_secret_interval);
}

static void rt_emergency_hash_rebuild(struct net *net)
Expand Down Expand Up @@ -3103,22 +3101,20 @@ static void rt_secret_reschedule(int old)
rtnl_lock();
for_each_net(net) {
int deleted = del_timer_sync(&net->ipv4.rt_secret_timer);
long time;

if (!new)
continue;

if (deleted) {
long time = net->ipv4.rt_secret_timer.expires - jiffies;
time = net->ipv4.rt_secret_timer.expires - jiffies;

if (time <= 0 || (time += diff) <= 0)
time = 0;

net->ipv4.rt_secret_timer.expires = time;
} else
net->ipv4.rt_secret_timer.expires = new;
time = new;

net->ipv4.rt_secret_timer.expires += jiffies;
add_timer(&net->ipv4.rt_secret_timer);
mod_timer(&net->ipv4.rt_secret_timer, jiffies + time);
}
rtnl_unlock();
}
Expand Down

0 comments on commit 3d39269

Please sign in to comment.