patch-2.3.99-pre1 linux/net/x25/x25_link.c
Next file: linux/scripts/Makefile
Previous file: linux/net/x25/af_x25.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Sun Mar 12 19:11:17 2000
- Orig file:
v2.3.51/linux/net/x25/x25_link.c
- Orig date:
Thu Aug 26 13:05:47 1999
diff -u --recursive --new-file v2.3.51/linux/net/x25/x25_link.c linux/net/x25/x25_link.c
@@ -73,18 +73,25 @@
del_timer(&neigh->t20timer);
}
+static int x25_t20timer_pending(struct x25_neigh *neigh)
+{
+ return timer_pending(&neigh->t20timer);
+}
+
/*
* This handles all restart and diagnostic frames.
*/
void x25_link_control(struct sk_buff *skb, struct x25_neigh *neigh, unsigned short frametype)
{
struct sk_buff *skbn;
+ int confirm;
switch (frametype) {
case X25_RESTART_REQUEST:
+ confirm = !x25_t20timer_pending(neigh);
x25_stop_t20timer(neigh);
neigh->state = X25_LINK_STATE_3;
- x25_transmit_restart_confirmation(neigh);
+ if (confirm) x25_transmit_restart_confirmation(neigh);
break;
case X25_RESTART_CONFIRMATION:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)