diff -ur --new-file old/linux/drivers/atm/zatm.c new/linux/drivers/atm/zatm.c --- old/linux/drivers/atm/zatm.c Fri Nov 29 20:12:45 1996 +++ new/linux/drivers/atm/zatm.c Fri Nov 29 20:13:13 1996 @@ -251,7 +251,9 @@ { int i; - max_pdu += ATM_CELL_PAYLOAD-1; + if (max_pdu % ATM_CELL_PAYLOAD) + printk(KERN_ERR DEV_LABEL ": driver error in pool_index: " + "max_pdu is %d\n",max_pdu); if (max_pdu > 65536) return -1; for (i = 0; (64 << i) < max_pdu; i++); return i+ZATM_AAL5_POOL_BASE; diff -ur --new-file old/linux/include/linux/atmlec.h new/linux/include/linux/atmlec.h --- old/linux/include/linux/atmlec.h Fri Nov 29 20:12:46 1996 +++ new/linux/include/linux/atmlec.h Fri Nov 29 20:13:16 1996 @@ -22,7 +22,7 @@ typedef enum { l_set_mac_addr, l_del_mac_addr, - l_flush_xmt, l_svc_setup, + l_svc_setup, l_addr_delete, l_topology_change, l_flush_complete, l_arp_update, l_config, l_flush_tran_id, diff -ur --new-file old/linux/net/atm/lec.c new/linux/net/atm/lec.c --- old/linux/net/atm/lec.c Fri Nov 29 20:12:46 1996 +++ new/linux/net/atm/lec.c Fri Nov 29 20:13:16 1996 @@ -24,6 +24,7 @@ #include "lec_arpc.h" #include "tunable.h" + #define DPRINTK(format,args...) /* #define DPRINTK printk @@ -336,8 +337,7 @@ priv->topology_change = mesg->content.normal.flag; break; case l_flush_complete: - lec_flush_complete(priv, mesg->content.normal.atm_addr, - mesg->content.normal.flag); + lec_flush_complete(priv, mesg->content.normal.flag); break; case l_arp_update: lec_arp_update(priv, mesg->content.normal.mac_addr, @@ -361,7 +361,7 @@ (mesg->content.config.path_switching_delay*HZ); break; case l_flush_tran_id: - lec_set_flush_tran_id(priv, mesg->content.normal.mac_addr, + lec_set_flush_tran_id(priv, mesg->content.normal.atm_addr, mesg->content.normal.flag); break; case l_set_lecid: @@ -613,12 +613,12 @@ if ((result = register_netdev(dev_lec[i])) !=0) return result; priv = (struct lec_priv *)dev_lec[i]->priv; - lec_arp_init(priv); } else { priv = (struct lec_priv *)dev_lec[i]->priv; if (priv->lecd) return -EADDRINUSE; } + lec_arp_init(priv); priv->lecd = vcc; vcc->dev = &lecatm_dev; diff -ur --new-file old/linux/net/atm/lec_arpc.c new/linux/net/atm/lec_arpc.c --- old/linux/net/atm/lec_arpc.c Fri Nov 29 20:12:46 1996 +++ new/linux/net/atm/lec_arpc.c Fri Nov 29 20:13:17 1996 @@ -154,7 +154,6 @@ lec_arp_clear_vccs(to_remove); } restore_flags(flags); - DPRINTK("LEC_ARP: Removed entry:%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", 0xff&to_remove->mac_addr[0], 0xff&to_remove->mac_addr[1], 0xff&to_remove->mac_addr[2], 0xff&to_remove->mac_addr[3], @@ -190,7 +189,7 @@ #if DEBUG_ARP_TABLE int i,j, offset; struct lec_arp_table *rulla; - char buf[512]; + char buf[1024]; struct lec_arp_table **lec_arp_tables = (struct lec_arp_table **)priv->lec_arp_tables; struct lec_arp_table *lec_arp_empty_ones = @@ -412,6 +411,7 @@ del_timer(&entry->timer); + DPRINTK("lec_arp_expire_arp\n"); if (entry->status == ESI_ARP_PENDING) { if (entry->no_tries <= entry->priv->max_retry_count) { send_to_lecd(entry->priv, l_arp_xmt, @@ -439,8 +439,8 @@ DPRINTK("LEC_ARP %p %p: lec_arp_expire_vcc vpi:%d vci:%d\n", to_remove, priv, - to_remove->vcc?to_remove->vcc->vpi:0, - to_remove->vcc?to_remove->vcc->vci:0); + to_remove->vcc?to_remove->recv_vcc->vpi:0, + to_remove->vcc?to_remove->recv_vcc->vci:0); DPRINTK("eo:%p nf:%p\n",priv->lec_arp_empty_ones,priv->lec_no_forward); if (to_remove == priv->lec_arp_empty_ones) priv->lec_arp_empty_ones = to_remove->next; @@ -513,7 +513,7 @@ if((now-entry->last_used > time_to_check) && !(entry->flags & LEC_PERMANENT_FLAG)) { /* Remove entry */ - printk("LEC:Remove entry1\n"); + DPRINTK("LEC:Entry timed out\n"); next = entry->next; lec_arp_remove(lec_arp_tables, entry); kfree(entry); @@ -545,7 +545,6 @@ priv->lec_arp_timer.expires = jiffies + LEC_ARP_REFRESH_INTERVAL; add_timer(&priv->lec_arp_timer); } - /* * Try to find vcc where mac_address is attached. * @@ -589,7 +588,6 @@ return priv->mcast_vcc; } lec_arp_put(priv->lec_arp_tables, entry); - init_timer(&entry->timer); make_arp_entry: /* We want arp-request(s) to be sent */ entry->packets_flooded =1; @@ -612,7 +610,7 @@ int i; lec_arp_lock(priv); - printk("lec_addr_delete\n"); + DPRINTK("lec_addr_delete\n"); for(i=0;i<LEC_ARP_TABLE_SIZE;i++) { for(entry=priv->lec_arp_tables[i];entry != NULL; entry=next) { next = entry->next; @@ -643,7 +641,6 @@ DPRINTK("LEC:lec_arp_update mac:%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", mac_addr[0],mac_addr[1],mac_addr[2],mac_addr[3], mac_addr[4],mac_addr[5]); - dump_arp_table(priv); lec_arp_lock(priv); if (priv->lec_arp_empty_ones) { entry = priv->lec_arp_empty_ones; @@ -780,6 +777,7 @@ entry->status = ESI_UNKNOWN; entry->timer.expires = jiffies + priv->vcc_timeout_period; entry->timer.function = lec_arp_expire_vcc; + add_timer(&entry->timer); entry->next = priv->lec_no_forward; priv->lec_no_forward = entry; lec_arp_unlock(priv); @@ -821,9 +819,11 @@ entry->timestamp = jiffies; entry->status = ESI_FLUSH_PENDING; - send_to_lecd(priv,l_flush_xmt, - entry->mac_addr, +#if 0 + send_to_lecd(priv,l_flush_xmt, + NULL, entry->atm_addr); +#endif } } else { /* They were forming a connection @@ -865,48 +865,37 @@ } void -lec_flush_complete(struct lec_priv *priv, - unsigned char *atm_addr, unsigned long tran_id) +lec_flush_complete(struct lec_priv *priv, unsigned long tran_id) { struct lec_arp_table *entry; int i; - DPRINTK("LEC:lec_flush_complete\n"); + DPRINTK("LEC:lec_flush_complete %lx\n",tran_id); for (i=0;i<LEC_ARP_TABLE_SIZE;i++) { for (entry=priv->lec_arp_tables[i];entry;entry=entry->next) { - if (memcmp(atm_addr, entry->atm_addr,ATM_ESA_LEN)==0 && - entry->flush_tran_id == tran_id) { - DPRINTK("entry->status:%d\n",entry->status); + if (entry->flush_tran_id == tran_id && + entry->status == ESI_FLUSH_PENDING) { entry->status = ESI_FORWARD_DIRECT; DPRINTK("LEC_ARP: Flushed\n"); - dump_arp_table(priv); - return; } } } - printk("LEC_ARP: Flush_complete: entry not found : %2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", - 0xff&atm_addr[0],0xff&atm_addr[1],0xff&atm_addr[2], - 0xff&atm_addr[3],0xff&atm_addr[4],0xff&atm_addr[5], - 0xff&atm_addr[6],0xff&atm_addr[7],0xff&atm_addr[8], - 0xff&atm_addr[9],0xff&atm_addr[10],0xff&atm_addr[11], - 0xff&atm_addr[12],0xff&atm_addr[13],0xff&atm_addr[14], - 0xff&atm_addr[15],0xff&atm_addr[16],0xff&atm_addr[17], - 0xff&atm_addr[18],0xff&atm_addr[19]); + dump_arp_table(priv); } void lec_set_flush_tran_id(struct lec_priv *priv, - unsigned char *mac_addr, unsigned long tran_id) + unsigned char *atm_addr, unsigned long tran_id) { struct lec_arp_table *entry; + int i; - entry = lec_arp_find(priv, mac_addr); - if (!entry) { - printk("LEC_ARP: Set_flush_tran_id: entry not found\n"); - return; - } - DPRINTK("LEC: flush_tran_id:%lx\n",tran_id); - entry->flush_tran_id = tran_id; + for (i=0;i<LEC_ARP_TABLE_SIZE;i++) + for(entry=priv->lec_arp_tables[i];entry;entry=entry->next) + if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN)) { + entry->flush_tran_id = tran_id; + DPRINTK("Set flush transaction id to %lx for %p\n",tran_id,entry); + } } int diff -ur --new-file old/linux/net/atm/lec_arpc.h new/linux/net/atm/lec_arpc.h --- old/linux/net/atm/lec_arpc.h Fri Nov 29 20:12:46 1996 +++ new/linux/net/atm/lec_arpc.h Fri Nov 29 20:13:17 1996 @@ -91,8 +91,7 @@ struct atm_vcc *vcc, struct sk_buff *skb); int lec_addr_delete(struct lec_priv *priv, unsigned char *mac_addr, unsigned long permanent); -void lec_flush_complete(struct lec_priv *priv, - unsigned char *atm_addr, unsigned long tran_id); +void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id); void lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr, unsigned char *atm_addr, unsigned long remoteflag); diff -ur --new-file old/linux/net/ipv4/tcp_input.c new/linux/net/ipv4/tcp_input.c --- old/linux/net/ipv4/tcp_input.c Fri Nov 29 20:12:46 1996 +++ new/linux/net/ipv4/tcp_input.c Fri Nov 29 20:13:17 1996 @@ -2012,6 +2012,12 @@ return 0; } + /* + * Need to do option processing early to get + * window scale right. + */ + tcp_options(sk,th); + /* process the ACK, get the SYN packet out * of the send queue, do other initial * processing stuff. [We know it's good, and @@ -2029,7 +2035,6 @@ sk->fin_seq = skb->seq; tcp_send_ack(sk); tcp_set_state(sk, TCP_ESTABLISHED); - tcp_options(sk,th); sk->dummy_th.dest=th->source; sk->copied_seq = sk->acked_seq; if(!sk->dead)