/* State machine for state 2, Awaiting Clear Confirmation State. The handling of the timer(s) is in file x25_timer.c Handling of state 0 and connection release is in af_x25.c.  */
static int x25_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype)
/* State machine for state 2, Awaiting Clear Confirmation State. The handling of the timer(s) is in file x25_timer.c Handling of state 0 and connection release is in af_x25.c.  */
static int x25_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype)
{
	switch (frametype) {
		case X25_CLEAR_REQUEST:
			x25_write_internal(sk, X25_CLEAR_CONFIRMATION);
			x25_disconnect(sk, 0, skb->data[3], skb->data[4]);
			break;
		case X25_CLEAR_CONFIRMATION:
			x25_disconnect(sk, 0, 0, 0);
			break;
		default:
			break;
	}
	return 0;
}