this patch changes the following in tr.c
o adds support for IPv6 over Token Ring
o fixes a bug where packets with 2 byte RIF fields are displayed
  incorrectly by tcpdump et al.
--jochen
--- linux-2.5.45.orig/net/802/tr.c	2002-10-31 01:41:54.000000000 +0100
+++ linux-2.5.45/net/802/tr.c	2002-11-02 18:02:13.000000000 +0100
@@ -91,10 +91,10 @@
 	int hdr_len;
 	/*
-	 * Add the 802.2 SNAP header if IP as the IPv4 code calls
+	 * Add the 802.2 SNAP header if IP as the IPv4/IPv6 code calls
 	 * dev->hard_header directly.
 	 */
-	if (type == ETH_P_IP || type == ETH_P_ARP)
+	if (type == ETH_P_IP || type == ETH_P_IPV6 || type == ETH_P_ARP)
 	{
 		struct trllc *trllc=(struct trllc *)(trh+1);
@@ -216,6 +216,7 @@
 	if (trllc->dsap == EXTENDED_SAP &&
 	    (trllc->ethertype == ntohs(ETH_P_IP) ||
+	     trllc->ethertype == ntohs(ETH_P_IPV6) ||
 	     trllc->ethertype == ntohs(ETH_P_ARP)))
 	{
 		skb_pull(skb, sizeof(struct trllc));
@@ -323,6 +324,7 @@
 {
 	int i;
 	unsigned int hash, rii_p = 0;
+	unsigned rif = 0;
 	rif_cache entry;
@@ -334,6 +336,7 @@
        	if(trh->saddr[0] & TR_RII)
 	{
+		rif = 1;
 		trh->saddr[0]&=0x7f;
 		if (((ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8) > 2)
 		{
@@ -380,7 +383,6 @@
 			entry->rcf = trh->rcf & htons((unsigned short)~TR_RCF_BROADCAST_MASK);
 			memcpy(&(entry->rseg[0]),&(trh->rseg[0]),8*sizeof(unsigned short));
 			entry->local_ring = 0;
-			trh->saddr[0]|=TR_RII; /* put the routing indicator back for tcpdump */
 		}
 		else
 		{
@@ -407,6 +409,8 @@
 		    }
            	entry->last_used=jiffies;
 	}
+	if (rif)
+		trh->saddr[0]|=TR_RII; /* put the routing indicator back for tcpdump */
 	spin_unlock_bh(&rif_lock);
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/