diff options
| author | David S. Miller <davem@davemloft.net> | 2013-03-26 12:32:40 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-03-26 12:32:40 -0400 |
| commit | 8dc57da2e23085642cad20d11385e13e079715c4 (patch) | |
| tree | 5b139f5beb784ea6f9956bec12f8c21a95d228ff /include/linux | |
| parent | b8092861efd827deb8d84292674704ee8bf41b04 (diff) | |
| parent | cb6bf35502d53364d15737295bc64f804c4587ce (diff) | |
Merge branch 'ipv6-firewire'
YOSHIFUJI Hideaki says:
====================
This is take 4 of supporting IPv6 over Firewire (IEEE 1394) based on
RFC3146.
Take 3->4:
- Fix receiving 1394 ARP, which comes without arp$tha.
- Remove rfc3146 unit directory on module exit.
- other minor clean-ups - minimize diffs.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/if_arp.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index 89b4614a4722..f563907ed776 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 */ |
