Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / net / netrom / nr_in.c
index 9c44b37..a7d88b5 100644 (file)
@@ -22,8 +22,7 @@
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
-#include <net/tcp.h>
-#include <net/ip.h>                    /* For ip_rcv */
+#include <net/tcp_states.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 #include <linux/fcntl.h>
@@ -99,6 +98,11 @@ static int nr_state1_machine(struct sock *sk, struct sk_buff *skb,
                nr_disconnect(sk, ECONNREFUSED);
                break;
 
+       case NR_RESET:
+               if (sysctl_netrom_reset_circuit)
+                       nr_disconnect(sk, ECONNRESET);
+               break;
+
        default:
                break;
        }
@@ -125,6 +129,11 @@ static int nr_state2_machine(struct sock *sk, struct sk_buff *skb,
                nr_disconnect(sk, 0);
                break;
 
+       case NR_RESET:
+               if (sysctl_netrom_reset_circuit)
+                       nr_disconnect(sk, ECONNRESET);
+               break;
+
        default:
                break;
        }
@@ -255,6 +264,11 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype
                }
                break;
 
+       case NR_RESET:
+               if (sysctl_netrom_reset_circuit)
+                       nr_disconnect(sk, ECONNRESET);
+               break;
+
        default:
                break;
        }