diff options
Diffstat (limited to 'net/core/neighbour.c')
| -rw-r--r-- | net/core/neighbour.c | 24 | 
1 files changed, 15 insertions, 9 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 213cb7b26b7a..ec0bf737b076 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1133,7 +1133,8 @@ out:  	neigh_release(neigh);  } -int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) +int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb, +		       const bool immediate_ok)  {  	int rc;  	bool immediate_probe = false; @@ -1154,12 +1155,17 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)  			atomic_set(&neigh->probes,  				   NEIGH_VAR(neigh->parms, UCAST_PROBES));  			neigh_del_timer(neigh); -			neigh->nud_state     = NUD_INCOMPLETE; +			neigh->nud_state = NUD_INCOMPLETE;  			neigh->updated = now; -			next = now + max(NEIGH_VAR(neigh->parms, RETRANS_TIME), -					 HZ/100); +			if (!immediate_ok) { +				next = now + 1; +			} else { +				immediate_probe = true; +				next = now + max(NEIGH_VAR(neigh->parms, +							   RETRANS_TIME), +						 HZ / 100); +			}  			neigh_add_timer(neigh, next); -			immediate_probe = true;  		} else {  			neigh->nud_state = NUD_FAILED;  			neigh->updated = jiffies; @@ -1571,7 +1577,7 @@ static void neigh_managed_work(struct work_struct *work)  	write_lock_bh(&tbl->lock);  	list_for_each_entry(neigh, &tbl->managed_list, managed_list) -		neigh_event_send(neigh, NULL); +		neigh_event_send_probe(neigh, NULL, false);  	queue_delayed_work(system_power_efficient_wq, &tbl->managed_work,  			   NEIGH_VAR(&tbl->parms, DELAY_PROBE_TIME));  	write_unlock_bh(&tbl->lock); @@ -3364,7 +3370,7 @@ EXPORT_SYMBOL(neigh_seq_stop);  static void *neigh_stat_seq_start(struct seq_file *seq, loff_t *pos)  { -	struct neigh_table *tbl = PDE_DATA(file_inode(seq->file)); +	struct neigh_table *tbl = pde_data(file_inode(seq->file));  	int cpu;  	if (*pos == 0) @@ -3381,7 +3387,7 @@ static void *neigh_stat_seq_start(struct seq_file *seq, loff_t *pos)  static void *neigh_stat_seq_next(struct seq_file *seq, void *v, loff_t *pos)  { -	struct neigh_table *tbl = PDE_DATA(file_inode(seq->file)); +	struct neigh_table *tbl = pde_data(file_inode(seq->file));  	int cpu;  	for (cpu = *pos; cpu < nr_cpu_ids; ++cpu) { @@ -3401,7 +3407,7 @@ static void neigh_stat_seq_stop(struct seq_file *seq, void *v)  static int neigh_stat_seq_show(struct seq_file *seq, void *v)  { -	struct neigh_table *tbl = PDE_DATA(file_inode(seq->file)); +	struct neigh_table *tbl = pde_data(file_inode(seq->file));  	struct neigh_statistics *st = v;  	if (v == SEQ_START_TOKEN) {  |