aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_output.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index a35209d517ad..f071f84808fa 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -164,7 +164,6 @@ EXPORT_SYMBOL_GPL(ip_build_and_send_pkt);
164static inline int ip_finish_output2(struct sk_buff *skb) 164static inline int ip_finish_output2(struct sk_buff *skb)
165{ 165{
166 struct dst_entry *dst = skb->dst; 166 struct dst_entry *dst = skb->dst;
167 struct hh_cache *hh = dst->hh;
168 struct net_device *dev = dst->dev; 167 struct net_device *dev = dst->dev;
169 int hh_len = LL_RESERVED_SPACE(dev); 168 int hh_len = LL_RESERVED_SPACE(dev);
170 169
@@ -183,16 +182,9 @@ static inline int ip_finish_output2(struct sk_buff *skb)
183 skb = skb2; 182 skb = skb2;
184 } 183 }
185 184
186 if (hh) { 185 if (dst->hh)
187 int hh_alen; 186 return neigh_hh_output(dst->hh, skb);
188 187 else if (dst->neighbour)
189 read_lock_bh(&hh->hh_lock);
190 hh_alen = HH_DATA_ALIGN(hh->hh_len);
191 memcpy(skb->data - hh_alen, hh->hh_data, hh_alen);
192 read_unlock_bh(&hh->hh_lock);
193 skb_push(skb, hh->hh_len);
194 return hh->hh_output(skb);
195 } else if (dst->neighbour)
196 return dst->neighbour->output(skb); 188 return dst->neighbour->output(skb);
197 189
198 if (net_ratelimit()) 190 if (net_ratelimit())