patch-2.3.29 linux/net/ipv4/arp.c

Next file: linux/net/ipv4/fib_frontend.c
Previous file: linux/net/ipv4/af_inet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.28/linux/net/ipv4/arp.c linux/net/ipv4/arp.c
@@ -205,9 +205,12 @@
 {
 	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 @@
 		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 @@
 			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 @@
  *	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;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)