- *addr = iph.daddr;
- } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) {
- struct arphdr arph;
-
- if (skb_copy_bits(skb, 0, &arph, sizeof(arph)) ||
- arph.ar_pln != sizeof(uint32_t) || arph.ar_hln != ETH_ALEN)
+ *addr = ih->daddr;
+ } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
+ struct arphdr _arph, *ah;
+ uint32_t buf, *bp;
+
+ ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph);
+ if (ah == NULL ||
+ ah->ar_pln != sizeof(uint32_t) ||
+ ah->ar_hln != ETH_ALEN)