aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index ccaaa851ab4..77d3eded665 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -204,9 +204,15 @@ static inline int ip_finish_output2(struct sk_buff *skb)
204 skb = skb2; 204 skb = skb2;
205 } 205 }
206 206
207 rcu_read_lock();
207 neigh = dst_get_neighbour(dst); 208 neigh = dst_get_neighbour(dst);
208 if (neigh) 209 if (neigh) {
209 return neigh_output(neigh, skb); 210 int res = neigh_output(neigh, skb);
211
212 rcu_read_unlock();
213 return res;
214 }
215 rcu_read_unlock();
210 216
211 if (net_ratelimit()) 217 if (net_ratelimit())
212 printk(KERN_DEBUG "ip_finish_output2: No header cache and no neighbour!\n"); 218 printk(KERN_DEBUG "ip_finish_output2: No header cache and no neighbour!\n");