net: Abstract dst->neighbour accesses behind helpers.
[deliverable/linux.git] / net / ipv4 / ip_output.c
index 84f26e8e6c6075a53806f7392eff87782df42151..be27e609a98b27a82e89b845fbd120808a1622b2 100644 (file)
@@ -182,6 +182,7 @@ static inline int ip_finish_output2(struct sk_buff *skb)
        struct rtable *rt = (struct rtable *)dst;
        struct net_device *dev = dst->dev;
        unsigned int hh_len = LL_RESERVED_SPACE(dev);
+       struct neighbour *neigh;
 
        if (rt->rt_type == RTN_MULTICAST) {
                IP_UPD_PO_STATS(dev_net(dev), IPSTATS_MIB_OUTMCAST, skb->len);
@@ -203,10 +204,9 @@ static inline int ip_finish_output2(struct sk_buff *skb)
                skb = skb2;
        }
 
-       if (dst->hh)
-               return neigh_hh_output(dst->hh, skb);
-       else if (dst->neighbour)
-               return dst->neighbour->output(skb);
+       neigh = dst_get_neighbour(dst);
+       if (neigh)
+               return neigh_output(neigh, skb);
 
        if (net_ratelimit())
                printk(KERN_DEBUG "ip_finish_output2: No header cache and no neighbour!\n");
@@ -489,7 +489,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
 
                if (first_len - hlen > mtu ||
                    ((first_len - hlen) & 7) ||
-                   (iph->frag_off & htons(IP_MF|IP_OFFSET)) ||
+                   ip_is_fragment(iph) ||
                    skb_cloned(skb))
                        goto slow_path;
 
This page took 0.030119 seconds and 5 git commands to generate.