aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2013-03-25 04:26:24 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-26 12:32:13 -0400
commitcb6bf35502d53364d15737295bc64f804c4587ce (patch)
tree5b139f5beb784ea6f9956bec12f8c21a95d228ff /net/ipv6/addrconf.c
parent6752c8db8e0cfedb44ba62806dd15b383ed64000 (diff)
firewire net, ipv6: IPv6 over Firewire (RFC3146) support.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 1b9f4f25212e..78d8414d2cf4 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -70,6 +70,7 @@
70#include <net/snmp.h> 70#include <net/snmp.h>
71 71
72#include <net/af_ieee802154.h> 72#include <net/af_ieee802154.h>
73#include <net/firewire.h>
73#include <net/ipv6.h> 74#include <net/ipv6.h>
74#include <net/protocol.h> 75#include <net/protocol.h>
75#include <net/ndisc.h> 76#include <net/ndisc.h>
@@ -1738,6 +1739,20 @@ static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev)
1738 return 0; 1739 return 0;
1739} 1740}
1740 1741
1742static int addrconf_ifid_ieee1394(u8 *eui, struct net_device *dev)
1743{
1744 union fwnet_hwaddr *ha;
1745
1746 if (dev->addr_len != FWNET_ALEN)
1747 return -1;
1748
1749 ha = (union fwnet_hwaddr *)dev->dev_addr;
1750
1751 memcpy(eui, &ha->uc.uniq_id, sizeof(ha->uc.uniq_id));
1752 eui[0] ^= 2;
1753 return 0;
1754}
1755
1741static int addrconf_ifid_arcnet(u8 *eui, struct net_device *dev) 1756static int addrconf_ifid_arcnet(u8 *eui, struct net_device *dev)
1742{ 1757{
1743 /* XXX: inherit EUI-64 from other interface -- yoshfuji */ 1758 /* XXX: inherit EUI-64 from other interface -- yoshfuji */
@@ -1802,6 +1817,8 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
1802 return addrconf_ifid_gre(eui, dev); 1817 return addrconf_ifid_gre(eui, dev);
1803 case ARPHRD_IEEE802154: 1818 case ARPHRD_IEEE802154:
1804 return addrconf_ifid_eui64(eui, dev); 1819 return addrconf_ifid_eui64(eui, dev);
1820 case ARPHRD_IEEE1394:
1821 return addrconf_ifid_ieee1394(eui, dev);
1805 } 1822 }
1806 return -1; 1823 return -1;
1807} 1824}
@@ -2643,7 +2660,8 @@ static void addrconf_dev_config(struct net_device *dev)
2643 (dev->type != ARPHRD_FDDI) && 2660 (dev->type != ARPHRD_FDDI) &&
2644 (dev->type != ARPHRD_ARCNET) && 2661 (dev->type != ARPHRD_ARCNET) &&
2645 (dev->type != ARPHRD_INFINIBAND) && 2662 (dev->type != ARPHRD_INFINIBAND) &&
2646 (dev->type != ARPHRD_IEEE802154)) { 2663 (dev->type != ARPHRD_IEEE802154) &&
2664 (dev->type != ARPHRD_IEEE1394)) {
2647 /* Alas, we support only Ethernet autoconfiguration. */ 2665 /* Alas, we support only Ethernet autoconfiguration. */
2648 return; 2666 return;
2649 } 2667 }