summaryrefslogtreecommitdiffstats
path: root/net/ipv4/arp.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
commit33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch)
tree2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /net/ipv4/arp.c
parent216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff)
Merge with Linux 2.3.32.
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r--net/ipv4/arp.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 263cd36e0..f4272338b 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -205,9 +205,12 @@ int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir)
{
switch (dev->type) {
case ARPHRD_ETHER:
- case ARPHRD_IEEE802:
case ARPHRD_FDDI:
- ip_eth_mc_map(addr, haddr);
+ case ARPHRD_IEEE802:
+ ip_eth_mc_map(addr, haddr) ;
+ return 0 ;
+ case ARPHRD_IEEE802_TR:
+ ip_tr_mc_map(addr, haddr) ;
return 0;
default:
if (dir) {
@@ -522,6 +525,12 @@ void arp_send(int type, int ptype, u32 dest_ip,
arp->ar_pro = __constant_htons(ETH_P_IP);
break;
#endif
+#ifdef CONFIG_TR
+ case ARPHRD_IEEE802_TR:
+ arp->ar_hrd = __constant_htons(ARPHRD_IEEE802);
+ arp->ar_pro = __constant_htons(ETH_P_IP);
+ break;
+#endif
}
arp->ar_hln = dev->addr_len;
@@ -604,6 +613,19 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
goto out;
break;
#endif
+#ifdef CONFIG_TR
+ case ARPHRD_IEEE802_TR:
+ /*
+ * Token ring devices will accept ARP hardware types of either
+ * 1 (Ethernet) or 6 (IEEE 802.2).
+ */
+ if (arp->ar_hrd != __constant_htons(ARPHRD_ETHER) &&
+ arp->ar_hrd != __constant_htons(ARPHRD_IEEE802))
+ goto out;
+ if (arp->ar_pro != __constant_htons(ETH_P_IP))
+ goto out;
+ break;
+#endif
#ifdef CONFIG_FDDI
case ARPHRD_FDDI:
/*
@@ -981,11 +1003,11 @@ out:
* Write the contents of the ARP cache to a PROCfs file.
*/
#ifndef CONFIG_PROC_FS
-static int arp_get_info(char *buffer, char **start, off_t offset, int length, int dummy) { return 0; }
+static int arp_get_info(char *buffer, char **start, off_t offset, int length) { return 0; }
#else
#define HBUFFERLEN 30
-static int arp_get_info(char *buffer, char **start, off_t offset, int length, int dummy)
+static int arp_get_info(char *buffer, char **start, off_t offset, int length)
{
int len=0;
off_t pos=0;