/* State machine for state 2, Awaiting Release State. The handling of the timer(s) is in file nr_timer.c Handling of state 0 and connection release is in netrom.c.  */
static int nr_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype)
/* State machine for state 2, Awaiting Release State. The handling of the timer(s) is in file nr_timer.c Handling of state 0 and connection release is in netrom.c.  */
static int nr_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype)
{
	switch (frametype) {
	case NR_CONNACK | NR_CHOKE_FLAG:
		nr_disconnect(sk, ECONNRESET);
		break;
	case NR_DISCREQ:
		nr_write_internal(sk, NR_DISCACK);
	case NR_DISCACK:
		nr_disconnect(sk, 0);
		break;
	case NR_RESET:
		if (sysctl_netrom_reset_circuit)
			nr_disconnect(sk, ECONNRESET);
		break;
	default:
		break;
	}
	return 0;
}