tcp: remove redundant code from tcp_mark_lost_retrans
[safe/jmp/linux-2.6] / net / ipv4 / arp.c
index 957c87d..3f6b735 100644 (file)
@@ -818,18 +818,18 @@ static int arp_process(struct sk_buff *skb)
                addr_type = rt->rt_type;
 
                if (addr_type == RTN_LOCAL) {
-                       n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
-                       if (n) {
-                               int dont_send = 0;
-
-                               if (!dont_send)
-                                       dont_send |= arp_ignore(in_dev, sip, tip);
-                               if (!dont_send && IN_DEV_ARPFILTER(in_dev))
-                                       dont_send |= arp_filter(sip, tip, dev);
-                               if (!dont_send)
-                                       arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha);
+                       int dont_send = 0;
 
-                               neigh_release(n);
+                       if (!dont_send)
+                               dont_send |= arp_ignore(in_dev,sip,tip);
+                       if (!dont_send && IN_DEV_ARPFILTER(in_dev))
+                               dont_send |= arp_filter(sip,tip,dev);
+                       if (!dont_send) {
+                               n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
+                               if (n) {
+                                       arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha);
+                                       neigh_release(n);
+                               }
                        }
                        goto out;
                } else if (IN_DEV_FORWARD(in_dev)) {
@@ -1226,7 +1226,7 @@ void arp_ifdown(struct net_device *dev)
  */
 
 static struct packet_type arp_packet_type = {
-       .type = __constant_htons(ETH_P_ARP),
+       .type = cpu_to_be16(ETH_P_ARP),
        .func = arp_rcv,
 };