patch-2.1.129 linux/drivers/net/net_init.c
Next file: linux/drivers/net/rtl8139.c
Previous file: linux/drivers/net/ltpc.c
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Mon Nov 16 10:39:27 1998
- Orig file:
v2.1.128/linux/drivers/net/net_init.c
- Orig date:
Tue Jun 23 10:01:23 1998
diff -u --recursive --new-file v2.1.128/linux/drivers/net/net_init.c linux/drivers/net/net_init.c
@@ -41,6 +41,7 @@
#include <linux/if_arp.h>
#include <linux/if_ltalk.h>
#include <linux/rtnetlink.h>
+#include <net/neighbour.h>
/* The network devices currently exist only in the socket namespace, so these
entries are unused. The only ones that make sense are
@@ -219,6 +220,21 @@
hippi_setup(tmp_dev);
return tmp_dev;
}
+
+static int hippi_neigh_setup_dev(struct device *dev, struct neigh_parms *p)
+{
+ /* Never send broadcast/multicast ARP messages */
+ p->mcast_probes = 0;
+
+ /* In IPv6 unicast probes are valid even on NBMA,
+ * because they are encapsulated in normal IPv6 protocol.
+ * Should be a generic flag.
+ */
+ if (p->tbl->family != AF_INET6)
+ p->ucast_probes = 0;
+ return 0;
+}
+
#endif
void ether_setup(struct device *dev)
@@ -304,6 +320,7 @@
dev->hard_header_parse = NULL;
dev->hard_header_cache = NULL;
dev->header_cache_update = NULL;
+ dev->neigh_setup = hippi_neigh_setup_dev;
/*
* We don't support HIPPI `ARP' for the time being, and probably
@@ -317,12 +334,13 @@
dev->tx_queue_len = 25 /* 5 */;
memset(dev->broadcast, 0xFF, HIPPI_ALEN);
- /* New-style flags. */
- dev->flags = IFF_NODYNARP; /*
- * HIPPI doesn't support
- * broadcast+multicast and we only
- * use static ARP tables.
- */
+
+ /*
+ * HIPPI doesn't support broadcast+multicast and we only use
+ * static ARP tables. ARP is disabled by hippi_neigh_setup_dev.
+ */
+ dev->flags = 0;
+
dev_init_buffers(dev);
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov