From 33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 4 Feb 2000 07:40:19 +0000 Subject: Merge with Linux 2.3.32. --- net/ipv4/arp.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'net/ipv4/arp.c') 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) { @@ -521,6 +524,12 @@ void arp_send(int type, int ptype, u32 dest_ip, arp->ar_hrd = __constant_htons(ARPHRD_ETHER); 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 } @@ -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; -- cgit v1.2.3