diff -ur --new-file old/atm/BUGS new/atm/BUGS --- old/atm/BUGS Sun Nov 1 17:40:25 1998 +++ new/atm/BUGS Tue Nov 3 18:36:43 1998 @@ -1,4 +1,4 @@ -Known bugs and restrictions in version 0.49 +Known bugs and restrictions in version 0.50 =========================================== - ANS: libresolve conflicts with libc on some systems diff -ur --new-file old/atm/CHANGES new/atm/CHANGES --- old/atm/CHANGES Sun Nov 1 19:30:35 1998 +++ new/atm/CHANGES Tue Nov 3 18:45:14 1998 @@ -1,3 +1,24 @@ +Version 0.49 to 0.50 (3-NOV-1998) +==================== + +Bug fixes +--------- + + - atmsigd didn't compile for -DUNI31 -DALLOW_UNI30 (fixed by Richard Gooch) + - atmsigd crashed on as_bind and also had problems with as_connect after + as_bind (reported by Heiko Krupp, Heikki Vatiainen, and many others) + +Other changes +------------- + + - atmsigd now enables tracing by default (use -t 0 to turn it off) + - added "terminate" message to test/isp + - mpoad defaults to UBR if service category is absent (by Heikki Vatiainen) + - LANE now avoids blocking intact connections when other connections have + problems by queuing packets independently per destination while waiting for + a connection (by Heikki Vatiainen) + + Version 0.48 to 0.49 (1-NOV-1998) ==================== diff -ur --new-file old/atm/README new/atm/README --- old/atm/README Sun Nov 1 17:37:26 1998 +++ new/atm/README Tue Nov 3 17:29:08 1998 @@ -1,4 +1,4 @@ -ATM on Linux, release 0.49 (alpha) by Werner Almesberger, EPFL ICA +ATM on Linux, release 0.50 (alpha) by Werner Almesberger, EPFL ICA ============================================== Werner.Almesberger@epfl.ch This is experimental software. There are known major bugs and certainly diff -ur --new-file old/atm/USAGE new/atm/USAGE --- old/atm/USAGE Sun Nov 1 19:27:42 1998 +++ new/atm/USAGE Tue Nov 3 18:26:59 1998 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.49 +Usage instructions - ATM on Linux, release 0.50 ------------------------------------------------- For updates of ATM on Linux, please check the Web page at @@ -17,7 +17,7 @@ In order to install this package, you need - the package itself - ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.49.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.50.tar.gz - the Linux kernel, version 2.1.126, e.g. from ftp://ftp.kernel.org/pub/linux/kernel/v2.1/linux-2.1.126.tar.gz - Perl, version 4 or 5 @@ -33,7 +33,7 @@ all the files listed above there. Then extract the ATM on Linux distribution: -tar xfz atm-0.49.tar.gz +tar xfz atm-0.50.tar.gz and the kernel source: diff -ur --new-file old/atm/VERSION new/atm/VERSION --- old/atm/VERSION Sun Nov 1 19:26:21 1998 +++ new/atm/VERSION Tue Nov 3 17:29:00 1998 @@ -1 +1 @@ -0.49 +0.50 diff -ur --new-file old/atm/atm.patch new/atm/atm.patch --- old/atm/atm.patch Sun Nov 1 19:25:59 1998 +++ new/atm/atm.patch Tue Nov 3 18:56:14 1998 @@ -17969,8 +17969,8 @@ + +#endif --- /dev/null Tue Jan 1 05:00:00 1980 -+++ work/net/atm/lec.c Sun Nov 1 15:31:53 1998 -@@ -0,0 +1,1992 @@ ++++ work/net/atm/lec.c Tue Nov 3 18:41:56 1998 +@@ -0,0 +1,2043 @@ +/* + * lec.c: Lan Emulation driver + * Marko Kiiskila carnil@cs.tut.fi @@ -18005,16 +18005,19 @@ +#include "tunable.h" +#include "resources.h" /* for bind_vcc() */ + -+#define DPRINTK(format,args...) -+/* ++#if 0 +#define DPRINTK printk -+*/ ++#else ++#define DPRINTK(format,args...) ++#endif ++ +#define DUMP_PACKETS 0 /* 0 = None, + * 1 = 30 first bytes + * 2 = Whole packet + */ + -+#define LEC_UNRES_QUE_LEN 8 ++#define LEC_UNRES_QUE_LEN 8 /* number of tx packets to queue for a ++ single destination while waiting for SVC */ + +static int lec_open(struct device *dev); +static int lec_send_packet(struct sk_buff *skb, struct device *dev); @@ -18075,9 +18078,11 @@ +static int +lec_send_packet(struct sk_buff *skb, struct device *dev) +{ ++ struct sk_buff *skb2; + struct lec_priv *priv = (struct lec_priv *)dev->priv; + struct lecdatahdr_8023 *lec_h; + struct atm_vcc *send_vcc; ++ struct lec_arp_table *entry = NULL; + unsigned char *nb; +#if DUMP_PACKETS > 0 + char buf[300]; @@ -18144,9 +18149,9 @@ + printk("%s...\n",buf); +#endif /* DUMP_PACKETS > 0 */ + /* Send to right vcc */ -+ send_vcc = lec_arp_resolve(priv, lec_h->h_dest); -+ DPRINTK("%s:send_vcc:%p vcc_flags:%x\n", dev->name, -+ send_vcc, send_vcc?send_vcc->flags:0); ++ send_vcc = lec_arp_resolve(priv, lec_h->h_dest, &entry); ++ DPRINTK("%s:send_vcc:%p vcc_flags:%x, entry:%p\n", dev->name, ++ send_vcc, send_vcc?send_vcc->flags:0, entry); + if (!send_vcc || !(send_vcc->flags & ATM_VF_READY)) { +#if 0 /* 24.8.1998 hessu@cs.tut.fi */ + priv->stats.tx_dropped++; @@ -18156,7 +18161,7 @@ + dev->tbusy=0; + return 0; +#endif -+#if 1 /* 26.8.1998 hessu@cs.tut.fi */ ++#if 0 /* 26.8.1998 hessu@cs.tut.fi */ + priv->stats.tx_errors++; + printk("%s:lec_send_packet: handing back ", dev->name); + printk("MAC address 0x%02x:%02x:%02x:%02x:%02x:%02x\n", @@ -18165,37 +18170,73 @@ + dev->tbusy = 1; + return 1; +#endif -+ } else { ++#if 1 /* 30.10.1998 s156953@cs.tut.fi hessu@cs.tut.fi */ ++ if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { ++ printk("%s:lec_send_packet: queuing packet, ", dev->name); ++ printk("MAC address 0x%02x:%02x:%02x:%02x:%02x:%02x\n", ++ lec_h->h_dest[0], lec_h->h_dest[1], lec_h->h_dest[2], ++ lec_h->h_dest[3], lec_h->h_dest[4], lec_h->h_dest[5]); ++ skb_queue_tail(&entry->tx_wait, skb); ++ } else { ++ printk("%s:lec_send_packet: tx queue full or no arp entry, dropping, ", dev->name); ++ printk("MAC address 0x%02x:%02x:%02x:%02x:%02x:%02x\n", ++ lec_h->h_dest[0], lec_h->h_dest[1], lec_h->h_dest[2], ++ lec_h->h_dest[3], lec_h->h_dest[4], lec_h->h_dest[5]); ++ priv->stats.tx_dropped++; ++ dev_kfree_skb(skb); ++ dev->tbusy = 0; ++ return 0; ++ } ++#endif ++ ++ } ++ /* Minimum ethernet-frame size */ ++ if (skb->len <62) { ++ if (skb->truesize < 62) { ++ printk("%s:data packet %d / %d\n", ++ dev->name, ++ skb->len,skb->truesize); ++ nb=(unsigned char*)kmalloc(64, GFP_ATOMIC); ++ memcpy(nb,skb->data,skb->len); ++ kfree(skb->head); ++ skb->head = skb->data = nb; ++ skb->tail = nb+62; ++ skb->end = nb+64; ++ skb->len=62; ++ skb->truesize = 64; ++ } else { ++ skb->len = 62; ++ } ++ } ++ if(!send_vcc){ ++ dev->tbusy=0; ++ return 0; ++ } ++ +#if DUMP_PACKETS > 0 -+ printk("%s:sending to vpi:%d vci:%d\n", dev->name, -+ send_vcc->vpi, send_vcc->vci); ++ printk("%s:sending to vpi:%d vci:%d\n", dev->name, ++ send_vcc->vpi, send_vcc->vci); +#endif /* DUMP_PACKETS > 0 */ -+ ATM_SKB(skb)->vcc = send_vcc; -+ /* Minimum ethernet-frame size */ -+ if (skb->len <62) { -+ if (skb->truesize < 62) { -+ printk("%s:data packet %d / %d\n", -+ dev->name, -+ skb->len,skb->truesize); -+ nb=(unsigned char*)kmalloc(64, -+ GFP_ATOMIC); -+ memcpy(nb,skb->data,skb->len); -+ kfree(skb->head); -+ skb->head = skb->data = nb; -+ skb->tail = nb+62; -+ skb->end = nb+64; -+ skb->len=62; -+ skb->truesize = 64; -+ } else { -+ skb->len = 62; -+ } -+ } -+ atomic_add(skb->truesize, &send_vcc->tx_inuse); -+ ATM_SKB(skb)->iovcnt = 0; -+ ATM_SKB(skb)->atm_options = send_vcc->atm_options; -+ send_vcc->dev->ops->send(send_vcc, skb); ++ ++ while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { ++ printk("lec.c: emptying tx queue, "); ++ printk("MAC address 0x%02x:%02x:%02x:%02x:%02x:%02x\n", ++ lec_h->h_dest[0], lec_h->h_dest[1], lec_h->h_dest[2], ++ lec_h->h_dest[3], lec_h->h_dest[4], lec_h->h_dest[5]); ++ ATM_SKB(skb2)->vcc = send_vcc; ++ atomic_add(skb2->truesize, &send_vcc->tx_inuse); ++ ATM_SKB(skb2)->iovcnt = 0; ++ ATM_SKB(skb2)->atm_options = send_vcc->atm_options; ++ send_vcc->dev->ops->send(send_vcc, skb2); + priv->stats.tx_packets++; + } ++ ++ ATM_SKB(skb)->vcc = send_vcc; ++ atomic_add(skb->truesize, &send_vcc->tx_inuse); ++ ATM_SKB(skb)->iovcnt = 0; ++ ATM_SKB(skb)->atm_options = send_vcc->atm_options; ++ send_vcc->dev->ops->send(send_vcc, skb); ++ priv->stats.tx_packets++; + } + /* Should we wait for card's device driver to notify us? */ + dev->tbusy=0; @@ -19052,13 +19093,13 @@ + if (remove_vcc) + lec_arp_clear_vccs(to_remove); + } ++ skb_queue_purge(&to_remove->tx_wait); /* FIXME: good place for this? */ + 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], + 0xff&to_remove->mac_addr[4], 0xff&to_remove->mac_addr[5]); -+ -+ return 0; ++ return 0; +} + +#if DEBUG_ARP_TABLE @@ -19227,6 +19268,7 @@ + next = entry->next; + del_timer(&entry->timer); + lec_arp_clear_vccs(entry); ++ skb_queue_purge(&entry->tx_wait); + kfree(entry); + entry = next; + } @@ -19236,6 +19278,7 @@ + next = entry->next; + del_timer(&entry->timer); + lec_arp_clear_vccs(entry); ++ skb_queue_purge(&entry->tx_wait); + kfree(entry); + entry = next; + } @@ -19293,6 +19336,7 @@ + to_return->timer.data = (unsigned long)to_return; + to_return->last_used = jiffies; + to_return->priv = priv; ++ skb_queue_head_init(&to_return->tx_wait); + return to_return; +} + @@ -19451,7 +19495,8 @@ + * + */ +struct atm_vcc* -+lec_arp_resolve(struct lec_priv *priv, unsigned char *mac_to_find) ++lec_arp_resolve(struct lec_priv *priv, unsigned char *mac_to_find, ++ struct lec_arp_table **ret_entry) +{ + unsigned char bus_mac[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff}; + struct lec_arp_table *entry; @@ -19476,6 +19521,7 @@ + if (entry->status == ESI_FORWARD_DIRECT) { + /* Connection Ok */ + entry->last_used = jiffies; ++ *ret_entry = entry; + return entry->vcc; + } + if (entry->status == ESI_UNKNOWN) { @@ -19492,6 +19538,7 @@ + DPRINTK("LEC_ARP: Flooding..\n"); + return priv->mcast_vcc; + } ++ *ret_entry = entry; + return NULL; + } else { + /* No matching entry was found */ @@ -19511,6 +19558,7 @@ + entry->timer.expires = jiffies + (1*HZ); + entry->timer.function = lec_arp_expire_arp; + add_timer(&entry->timer); ++ *ret_entry = entry; + return priv->mcast_vcc; + } +} @@ -19550,6 +19598,7 @@ + unsigned int targetless_le_arp) +{ + struct lec_arp_table *entry, *tmp; ++ struct sk_buff *skb; + int i; + + DPRINTK("lec:%s", (targetless_le_arp) ? "targetless ": " "); @@ -19589,6 +19638,8 @@ + tmp->vcc = entry->vcc; + tmp->old_push = entry->old_push; + tmp->last_used = jiffies; ++ while((skb = skb_dequeue(&entry->tx_wait)) != NULL) ++ skb_queue_tail(&tmp->tx_wait, skb); + kfree(entry); + entry=tmp; + } else { @@ -20110,8 +20161,8 @@ +#endif _LEC_H_ + --- /dev/null Tue Jan 1 05:00:00 1980 -+++ work/net/atm/lec_arpc.h Sun Nov 1 15:31:53 1998 -@@ -0,0 +1,112 @@ ++++ work/net/atm/lec_arpc.h Tue Nov 3 18:41:56 1998 +@@ -0,0 +1,114 @@ +/* + * Lec arp cache + * Marko Kiiskila carnil@cs.tut.fi @@ -20159,6 +20210,7 @@ + u8 *tlvs; /* LANE2: Each MAC address can have TLVs */ + u32 sizeoftlvs; /* associated with it. sizeoftlvs tells the */ + /* the length of the tlvs array */ ++ struct sk_buff_head tx_wait; /* wait queue for outgoing packets */ +}; + +struct tlv { /* LANE2: Template tlv struct for accessing */ @@ -20208,7 +20260,8 @@ +void lec_vcc_close(struct lec_priv *priv, struct atm_vcc *vcc); + +struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, -+ unsigned char *mac_to_addr); ++ unsigned char *mac_to_addr, ++ struct lec_arp_table **ret_entry); +void lec_vcc_added(struct lec_priv *dev, + struct atmlec_ioc *ioc_data, struct atm_vcc *vcc, + void (*old_push)(struct atm_vcc *vcc, struct sk_buff *skb)); diff -ur --new-file old/atm/doc/usage.tex new/atm/doc/usage.tex --- old/atm/doc/usage.tex Sun Nov 1 17:38:13 1998 +++ new/atm/doc/usage.tex Tue Nov 3 18:26:39 1998 @@ -1,7 +1,7 @@ %%def%:= %:\begin{verbatim} -%:Usage instructions - ATM on Linux, release 0.49 +%:Usage instructions - ATM on Linux, release 0.50 %:------------------------------------------------- %: %:\end{verbatim} @@ -38,14 +38,14 @@ \title{ATM on Linux \\ User's guide \\ - Release 0.49 (alpha)} + Release 0.50 (alpha)} \author{Werner Almesberger \\ {\tt Werner.Almesberger@epfl.ch} \\ \\ Institute for computer Communications and Applications (ICA) \\ EPFL, CH-1015 Lausanne, Switzerland} -\date{November 1, 1998} +\date{November 3, 1998} \begin{document} \maketitle @@ -82,7 +82,7 @@ In order to install this package, you need \begin{itemize} \item the package itself - \url{ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.49.tar.gz} + \url{ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.50.tar.gz} \item the Linux kernel, version 2.1.126, e.g. from \url{ftp://ftp.kernel.org/pub/linux/kernel/v2.1/linux-2.1.126.tar.gz} \item Perl, version 4 or 5 @@ -99,7 +99,7 @@ distribution: \begin{verbatim} -tar xfz atm-0.49.tar.gz +tar xfz atm-0.50.tar.gz \end{verbatim} and the kernel source: diff -ur --new-file old/atm/doc/usage.txt new/atm/doc/usage.txt --- old/atm/doc/usage.txt Sun Nov 1 19:27:42 1998 +++ new/atm/doc/usage.txt Tue Nov 3 18:26:59 1998 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.49 +Usage instructions - ATM on Linux, release 0.50 ------------------------------------------------- For updates of ATM on Linux, please check the Web page at @@ -17,7 +17,7 @@ In order to install this package, you need - the package itself - ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.49.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.50.tar.gz - the Linux kernel, version 2.1.126, e.g. from ftp://ftp.kernel.org/pub/linux/kernel/v2.1/linux-2.1.126.tar.gz - Perl, version 4 or 5 @@ -33,7 +33,7 @@ all the files listed above there. Then extract the ATM on Linux distribution: -tar xfz atm-0.49.tar.gz +tar xfz atm-0.50.tar.gz and the kernel source: diff -ur --new-file old/atm/mpoad/p_recogn.c new/atm/mpoad/p_recogn.c --- old/atm/mpoad/p_recogn.c Fri Oct 30 19:47:39 1998 +++ new/atm/mpoad/p_recogn.c Tue Nov 3 18:37:45 1998 @@ -347,6 +347,8 @@ memcpy(msg.MPS_ctrl,mpc_control.MPS_CTRL_ATM_ADDR, ATM_ESA_LEN); if(values.service_category_present) msg.qos.txtp.traffic_class = service_category_to_traff_class(values.service_category); + else + msg.qos.txtp.traffic_class = ATM_UBR; send_to_kernel(&msg); keep_alive_sm_running = 1; return MPOA_RESOLUTION_REPLY; diff -ur --new-file old/atm/sigd/atmsigd.8 new/atm/sigd/atmsigd.8 --- old/atm/sigd/atmsigd.8 Thu Jun 25 13:08:40 1998 +++ new/atm/sigd/atmsigd.8 Tue Nov 3 17:24:00 1998 @@ -1,4 +1,4 @@ -.TH ATMSIGD 8 "June 25, 1998" "Linux" "Maintenance Commands" +.TH ATMSIGD 8 "November 3, 1998" "Linux" "Maintenance Commands" .SH NAME atmsigd \- ATM signaling demon .SH SYNOPSIS @@ -46,8 +46,7 @@ quiet. .IP \fB\-D\ \fIdump_dir\fP Specifies the directory to which \fBatmsigd\fP will write status and trace -dumps. If tracing is not yet enabled, the trace size is automatically -set to a (small) default value. +dumps. If \fB\-D\fP is not specified, dumps are written to /var/tmp. .IP \fB\-l\ \fIlogfile\fP Write diagnostic messages to the specified file. The special name \fBsyslog\fP is used to send diagnostics to the system logger, \fBstderr\fP @@ -67,8 +66,9 @@ qos(7) for the syntax). By default, UBR at link speed is used on the signaling VC. .IP \fB\-t\ \fItrace_length\fP -Enables tracing and sets the number -of entries that should be kept in the trace buffer. +Sets the number of entries that should be kept in the trace buffer. +\fB\-t 0\fP disables tracing. If \fB\-t\fP is not specified, \fBatmsigd\fP +uses a default of 20 trace entries. .SH FILES .PD 0 .TP 25 @@ -82,7 +82,7 @@ default location of signaling trace dumps .PD .SH DEBUGGING -When receiving a \fBSIGUSR1\fP signals, \fBatmsigd\fP dumps the list of all +When receiving a \fBSIGUSR1\fP signal, \fBatmsigd\fP dumps the list of all internal socket descriptors. With \fBSIGUSR2\fP, it dumps the contents of the trace buffer. If a dump directory was set, dumps are written to files called \fBatmsigd.\fP\fIpid\fP\fB.status.\fP\fInumber\fP and diff -ur --new-file old/atm/sigd/atmsigd.c new/atm/sigd/atmsigd.c --- old/atm/sigd/atmsigd.c Sun Nov 1 19:41:18 1998 +++ new/atm/sigd/atmsigd.c Tue Nov 3 17:23:38 1998 @@ -31,7 +31,7 @@ int debug = 0; int pretty = A2T_PRETTY | A2T_NAME | A2T_LOCAL; -const char *dump_dir = NULL; +const char *dump_dir = DEFAULT_DUMP_DIR; /* A little hack until we have full support for multiple signaling entities */ @@ -328,7 +328,6 @@ set_application("atmsigd"); config_file = CONFIG_FILE; - dump_dir = NULL; background = 0; memset(&_entity.signaling_pvc,0,sizeof(_entity.signaling_pvc)); /* 1st pass to get the -c option */ @@ -364,7 +363,6 @@ break; case 'D': dump_dir = optarg; - if (!trace_size) trace_size = DEFAULT_TRACE_SIZE; break; case 'l': set_logfile(optarg); @@ -430,6 +428,7 @@ } } if (optind != argc) usage(argv[0]); + if (!trace_size) dump_dir = NULL; if (dump_dir) if (chdir(dump_dir) < 0) diag(COMPONENT,DIAG_ERROR,"chdir %s: %s",dump_dir,strerror(errno)); diff -ur --new-file old/atm/sigd/cfg.y new/atm/sigd/cfg.y --- old/atm/sigd/cfg.y Mon Oct 5 18:43:29 1998 +++ new/atm/sigd/cfg.y Mon Nov 2 08:37:12 1998 @@ -85,9 +85,9 @@ #endif #ifdef UNI31 S_UNI31 -#endif #ifdef ALLOW_UNI30 - S_UNI30 | S_UNI31 + | S_UNI30 +#endif #endif #ifdef UNI40 S_UNI40 diff -ur --new-file old/atm/sigd/kernel.c new/atm/sigd/kernel.c --- old/atm/sigd/kernel.c Sun Nov 1 16:55:55 1998 +++ new/atm/sigd/kernel.c Tue Nov 3 17:16:39 1998 @@ -45,9 +45,16 @@ q_create(&dsc,q_buffer,MAX_Q_MSG); local = NULL; error = 0; - if (atmsvc_addr_in_use(sock->local)) local = &sock->local; + if (atmsvc_addr_in_use(sock->local)) { + sock->sig = route_local(&sock->local); + if (sock->sig) local = &sock->local; + else { + error = -EADDRNOTAVAIL; + diag(COMPONENT,DIAG_WARN,"local address no longer available"); + } + } else { - sock->sig = route_call(&sock->remote); + sock->sig = route_remote(&sock->remote); if (!sock->sig) error = -EHOSTUNREACH; else { local = get_local(sock->sig->signaling_pvc.sap_addr.itf); @@ -75,7 +82,7 @@ q_assign(&dsc,QF_msg_type,ATM_MSG_SETUP); q_assign(&dsc,QF_aal_type,5); /* AAL 5 */ #if defined(UNI30) || defined(DYNAMIC_UNI) - if (sock->sig->uni == S_UNI30) + if (!error && sock->sig->uni == S_UNI30) q_assign(&dsc,QF_aal_mode,1); /* Message mode - LANE seems to really want this */ #endif @@ -85,18 +92,18 @@ sock->sig->uni); q_assign(&dsc,QF_bearer_class,16); /* BCOB-X */ #if defined(UNI30) || defined(ALLOW_UNI30) || defined(DYNAMIC_UNI) - if (sock->sig->uni & S_UNI30) + if (!error && sock->sig->uni & S_UNI30) q_assign(&dsc,QF_trans_cap,ATM_TC_VBR_NRT_R00); /* force presence - UNI 3.0 wants this */ #endif q_assign(&dsc,QF_upcc,0); /* p2p */ #if !defined(UNI30) || defined(DYNAMIC_UNI) - if (sock->sig->uni != S_UNI30) + if (!errror && sock->sig->uni != S_UNI30) q_assign(&dsc,QF_qos_cs,Q2931_CS_ITU); #endif q_assign(&dsc,QF_qos_fw,0); /* QOS 0 */ q_assign(&dsc,QF_qos_bw,0); - if (sock->sig->mode != sm_user) { + if (!error && sock->sig->mode != sm_user) { if (!atmpvc_addr_in_use(sock->pvc)) { int vpci,vci; @@ -203,23 +210,7 @@ send_kernel(msg->vcc,0,as_okay,0,NULL,NULL, &local_addr[0].addr,NULL,NULL); else { - LOCAL_ADDR *walk; - - for (walk = local_addr; walk->state != ls_unused; walk++) - if (walk->state == ls_same && - atm_equal((struct sockaddr *) &walk->addr, - (struct sockaddr *) &msg->svc,(ATM_ESA_LEN-1)*8, - AXE_WILDCARD)) break; - if(*msg->svc.sas_addr.pub) - diag(COMPONENT,DIAG_DEBUG,"binding to E.164 address " - "%s\n",msg->svc.sas_addr.pub); - if (walk->state == ls_unused) { - SEND_ERROR(msg->vcc,-EADDRNOTAVAIL); - return; - } - sock->sig = get_sig_entity(walk->itf); - if (!sock->sig) { - diag(COMPONENT,DIAG_ERROR,"signaling entity lookup failed"); + if (!route_local(&msg->svc)) { SEND_ERROR(msg->vcc,-EADDRNOTAVAIL); return; } @@ -233,6 +224,7 @@ return; } sock = new_sock(msg->vcc); + sock->local = msg->local; sock->remote = msg->svc; sock->qos = msg->qos; sock->sap = msg->sap; diff -ur --new-file old/atm/sigd/proto.c new/atm/sigd/proto.c --- old/atm/sigd/proto.c Sun Nov 1 16:57:13 1998 +++ new/atm/sigd/proto.c Tue Nov 3 17:16:43 1998 @@ -421,7 +421,7 @@ } -SIG_ENTITY *route_call(struct sockaddr_atmsvc *addr) +SIG_ENTITY *route_remote(struct sockaddr_atmsvc *addr) { ROUTE *best,*route; int best_len; @@ -450,4 +450,17 @@ if (sig->signaling_pvc.sap_addr.itf == itf) return sig; /* should also check for vpcis @@@ */ return NULL; +} + + +SIG_ENTITY *route_local(struct sockaddr_atmsvc *addr) +{ + LOCAL_ADDR *walk; + + for (walk = local_addr; walk->state != ls_unused; walk++) + if (walk->state == ls_same && atm_equal((struct sockaddr *) &walk->addr, + (struct sockaddr *) addr,(ATM_ESA_LEN-1)*8,AXE_WILDCARD)) + break; + if (walk->state == ls_unused) return NULL; + return get_sig_entity(walk->itf); } diff -ur --new-file old/atm/sigd/proto.h new/atm/sigd/proto.h --- old/atm/sigd/proto.h Sun Nov 1 16:56:36 1998 +++ new/atm/sigd/proto.h Tue Nov 3 17:23:56 1998 @@ -109,6 +109,7 @@ extern unsigned char q_buffer[]; #define DEFAULT_TRACE_SIZE 20 +#define DEFAULT_DUMP_DIR "/var/tmp" extern int pretty; extern const char *dump_dir; @@ -163,7 +164,8 @@ void init_addr(SIG_ENTITY *sig); void add_route(SIG_ENTITY *sig,struct sockaddr_atmsvc *addr,int len); -SIG_ENTITY *route_call(struct sockaddr_atmsvc *addr); +SIG_ENTITY *route_remote(struct sockaddr_atmsvc *addr); +SIG_ENTITY *route_local(struct sockaddr_atmsvc *addr); SIG_ENTITY *get_sig_entity(int itf); diff -ur --new-file old/atm/sigd/trace.c new/atm/sigd/trace.c --- old/atm/sigd/trace.c Mon Oct 5 09:59:36 1998 +++ new/atm/sigd/trace.c Tue Nov 3 17:21:15 1998 @@ -35,7 +35,7 @@ } ENTRY; -int trace_size = 0; +int trace_size = DEFAULT_TRACE_SIZE; static struct sockaddr_atmpvc null_pvc; static int current_size = 0; diff -ur --new-file old/atm/test/README.isp new/atm/test/README.isp --- old/atm/test/README.isp Thu Mar 5 22:55:04 1998 +++ new/atm/test/README.isp Tue Nov 3 18:24:56 1998 @@ -14,7 +14,7 @@ where msg_type: bind, connect, accept, reject, listen, okay, error, indicate, - close, itf_notify, modify, identify + close, itf_notify, modify, identify, terminate field: vcc, listen_vcc, reply, pvc, local, qos, svc, sap Variable syntax is like in Perl, i.e. a variable is always prefixed by diff -ur --new-file old/atm/test/isp.c new/atm/test/isp.c --- old/atm/test/isp.c Thu Apr 16 11:07:53 1998 +++ new/atm/test/isp.c Tue Nov 3 18:21:12 1998 @@ -95,7 +95,8 @@ { "close", F_VCC | F_REPLY }, { "itf_notify", F_PVC }, { "modify", F_VCC | F_REPLY | F_QOS }, - { "identify", F_VCC | F_LISTEN_VCC | F_PVC }}; + { "identify", F_VCC | F_LISTEN_VCC | F_PVC }, + { "terminate", 0 }}; #define MSG_TYPES (sizeof(types)/sizeof(*types)) diff -ur --new-file old/atm/test/ispl.l new/atm/test/ispl.l --- old/atm/test/ispl.l Sat Jun 6 01:57:42 1998 +++ new/atm/test/ispl.l Tue Nov 3 18:21:33 1998 @@ -50,6 +50,7 @@ itf_notify return TOK_ITF_NOTIFY; modify return TOK_MODIFY; identify return TOK_IDENTIFY; +terminate return TOK_TERMINATE; \\[\t ]*\n lineno++; #[^\n]*\n lineno++; [^ \t\n\$=][^ \t\n]* { diff -ur --new-file old/atm/test/ispl.y new/atm/test/ispl.y --- old/atm/test/ispl.y Thu Apr 16 11:06:29 1998 +++ new/atm/test/ispl.y Tue Nov 3 18:23:51 1998 @@ -32,7 +32,7 @@ %token TOK_LOCAL TOK_QOS TOK_SVC TOK_BIND TOK_CONNECT TOK_ACCEPT %token TOK_REJECT TOK_LISTEN TOK_OKAY TOK_ERROR TOK_INDICATE %token TOK_CLOSE TOK_ITF_NOTIFY TOK_MODIFY TOK_SAP -%token TOK_IDENTIFY TOK_EOL +%token TOK_IDENTIFY TOK_TERMINATE TOK_EOL %token TOK_VALUE TOK_VARIABLE %type type @@ -97,7 +97,7 @@ " echo value\n" " help\n\n" "msg_type: bind, connect, accept, reject, listen, okay, error, indicate,\n" -" close, itf_notify, modify, identify\n" +" close, itf_notify, modify, identify, terminate\n" "field: vcc, listen_vcc, reply, pvc, local, qos, svc, sap\n"); } | TOK_EOL @@ -151,6 +151,10 @@ | TOK_IDENTIFY { $$ = as_identify; + } + | TOK_TERMINATE + { + $$ = as_terminate; } ; .