patch-2.4.22 linux-2.4.22/net/ipv6/addrconf.c
Next file: linux-2.4.22/net/ipv6/af_inet6.c
Previous file: linux-2.4.22/net/ipv4/utils.c
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/net/ipv6/addrconf.c
- Orig date:
2003-06-13 07:51:39.000000000 -0700
diff -urN linux-2.4.21/net/ipv6/addrconf.c linux-2.4.22/net/ipv6/addrconf.c
@@ -19,7 +19,7 @@
*
* Janos Farkas : delete timer on ifdown
* <chexum@bankinf.banki.hu>
- * Andi Kleen : kill doube kfree on module
+ * Andi Kleen : kill double kfree on module
* unload.
* Maciej W. Rozycki : FDDI support
* sekiya@USAGI : Don't send too many RS
@@ -30,6 +30,7 @@
* address validation timer.
* Yuji SEKIYA @USAGI : Don't assign a same IPv6
* address on a same interface.
+ * YOSHIFUJI Hideaki @USAGI : ARCnet support
*/
#include <linux/config.h>
@@ -42,6 +43,7 @@
#include <linux/in6.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
+#include <linux/if_arcnet.h>
#include <linux/route.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
@@ -827,6 +829,13 @@
eui[4] = 0xFE;
eui[0] ^= 2;
return 0;
+ case ARPHRD_ARCNET:
+ /* XXX: inherit EUI-64 fro mother interface -- yoshfuji */
+ if (dev->addr_len != ARCNET_ALEN)
+ return -1;
+ memset(eui, 0, 7);
+ eui[7] = *(u8*)dev->dev_addr;
+ return 0;
}
return -1;
}
@@ -903,7 +912,7 @@
rtmsg.rtmsg_type = RTMSG_NEWROUTE;
rtmsg.rtmsg_metric = IP6_RT_PRIO_ADDRCONF;
- /* prefix length - 96 bytes "::d.d.d.d" */
+ /* prefix length - 96 bits "::d.d.d.d" */
rtmsg.rtmsg_dst_len = 96;
rtmsg.rtmsg_flags = RTF_UP|RTF_NONEXTHOP;
rtmsg.rtmsg_ifindex = dev->ifindex;
@@ -1355,7 +1364,8 @@
if ((dev->type != ARPHRD_ETHER) &&
(dev->type != ARPHRD_FDDI) &&
- (dev->type != ARPHRD_IEEE802_TR)) {
+ (dev->type != ARPHRD_IEEE802_TR) &&
+ (dev->type != ARPHRD_ARCNET)) {
/* Alas, we support only Ethernet autoconfiguration. */
return;
}
@@ -2188,6 +2198,7 @@
case ARPHRD_ETHER:
case ARPHRD_FDDI:
case ARPHRD_IEEE802_TR:
+ case ARPHRD_ARCNET:
addrconf_dev_config(dev);
break;
default:;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)