summaryrefslogtreecommitdiffstats
path: root/include/linux/if_arp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/if_arp.h')
-rw-r--r--include/linux/if_arp.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 89b4614a472..f563907ed77 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -33,7 +33,15 @@ static inline struct arphdr *arp_hdr(const struct sk_buff *skb)
static inline int arp_hdr_len(struct net_device *dev)
{
- /* ARP header, plus 2 device addresses, plus 2 IP addresses. */
- return sizeof(struct arphdr) + (dev->addr_len + sizeof(u32)) * 2;
+ switch (dev->type) {
+#if IS_ENABLED(CONFIG_FIREWIRE_NET)
+ case ARPHRD_IEEE1394:
+ /* ARP header, device address and 2 IP addresses */
+ return sizeof(struct arphdr) + dev->addr_len + sizeof(u32) * 2;
+#endif
+ default:
+ /* ARP header, plus 2 device addresses, plus 2 IP addresses. */
+ return sizeof(struct arphdr) + (dev->addr_len + sizeof(u32)) * 2;
+ }
}
#endif /* _LINUX_IF_ARP_H */