xref: /openbmc/linux/net/x25/x25_in.c (revision 1da177e4)
11da177e4SLinus Torvalds /*
21da177e4SLinus Torvalds  *	X.25 Packet Layer release 002
31da177e4SLinus Torvalds  *
41da177e4SLinus Torvalds  *	This is ALPHA test software. This code may break your machine,
51da177e4SLinus Torvalds  *	randomly fail to work with new releases, misbehave and/or generally
61da177e4SLinus Torvalds  *	screw up. It might even work.
71da177e4SLinus Torvalds  *
81da177e4SLinus Torvalds  *	This code REQUIRES 2.1.15 or higher
91da177e4SLinus Torvalds  *
101da177e4SLinus Torvalds  *	This module:
111da177e4SLinus Torvalds  *		This module is free software; you can redistribute it and/or
121da177e4SLinus Torvalds  *		modify it under the terms of the GNU General Public License
131da177e4SLinus Torvalds  *		as published by the Free Software Foundation; either version
141da177e4SLinus Torvalds  *		2 of the License, or (at your option) any later version.
151da177e4SLinus Torvalds  *
161da177e4SLinus Torvalds  *	History
171da177e4SLinus Torvalds  *	X.25 001	Jonathan Naylor	  Started coding.
181da177e4SLinus Torvalds  *	X.25 002	Jonathan Naylor	  Centralised disconnection code.
191da177e4SLinus Torvalds  *					  New timer architecture.
201da177e4SLinus Torvalds  *	2000-03-20	Daniela Squassoni Disabling/enabling of facilities
211da177e4SLinus Torvalds  *					  negotiation.
221da177e4SLinus Torvalds  *	2000-11-10	Henner Eisen	  Check and reset for out-of-sequence
231da177e4SLinus Torvalds  *					  i-frames.
241da177e4SLinus Torvalds  */
251da177e4SLinus Torvalds 
261da177e4SLinus Torvalds #include <linux/errno.h>
271da177e4SLinus Torvalds #include <linux/kernel.h>
281da177e4SLinus Torvalds #include <linux/string.h>
291da177e4SLinus Torvalds #include <linux/skbuff.h>
301da177e4SLinus Torvalds #include <net/sock.h>
311da177e4SLinus Torvalds #include <net/tcp.h>
321da177e4SLinus Torvalds #include <net/x25.h>
331da177e4SLinus Torvalds 
341da177e4SLinus Torvalds static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
351da177e4SLinus Torvalds {
361da177e4SLinus Torvalds 	struct sk_buff *skbo, *skbn = skb;
371da177e4SLinus Torvalds 	struct x25_sock *x25 = x25_sk(sk);
381da177e4SLinus Torvalds 
391da177e4SLinus Torvalds 	if (more) {
401da177e4SLinus Torvalds 		x25->fraglen += skb->len;
411da177e4SLinus Torvalds 		skb_queue_tail(&x25->fragment_queue, skb);
421da177e4SLinus Torvalds 		skb_set_owner_r(skb, sk);
431da177e4SLinus Torvalds 		return 0;
441da177e4SLinus Torvalds 	}
451da177e4SLinus Torvalds 
461da177e4SLinus Torvalds 	if (!more && x25->fraglen > 0) {	/* End of fragment */
471da177e4SLinus Torvalds 		int len = x25->fraglen + skb->len;
481da177e4SLinus Torvalds 
491da177e4SLinus Torvalds 		if ((skbn = alloc_skb(len, GFP_ATOMIC)) == NULL){
501da177e4SLinus Torvalds 			kfree_skb(skb);
511da177e4SLinus Torvalds 			return 1;
521da177e4SLinus Torvalds 		}
531da177e4SLinus Torvalds 
541da177e4SLinus Torvalds 		skb_queue_tail(&x25->fragment_queue, skb);
551da177e4SLinus Torvalds 
561da177e4SLinus Torvalds 		skbn->h.raw = skbn->data;
571da177e4SLinus Torvalds 
581da177e4SLinus Torvalds 		skbo = skb_dequeue(&x25->fragment_queue);
591da177e4SLinus Torvalds 		memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
601da177e4SLinus Torvalds 		kfree_skb(skbo);
611da177e4SLinus Torvalds 
621da177e4SLinus Torvalds 		while ((skbo =
631da177e4SLinus Torvalds 			skb_dequeue(&x25->fragment_queue)) != NULL) {
641da177e4SLinus Torvalds 			skb_pull(skbo, (x25->neighbour->extended) ?
651da177e4SLinus Torvalds 					X25_EXT_MIN_LEN : X25_STD_MIN_LEN);
661da177e4SLinus Torvalds 			memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
671da177e4SLinus Torvalds 			kfree_skb(skbo);
681da177e4SLinus Torvalds 		}
691da177e4SLinus Torvalds 
701da177e4SLinus Torvalds 		x25->fraglen = 0;
711da177e4SLinus Torvalds 	}
721da177e4SLinus Torvalds 
731da177e4SLinus Torvalds 	skb_set_owner_r(skbn, sk);
741da177e4SLinus Torvalds 	skb_queue_tail(&sk->sk_receive_queue, skbn);
751da177e4SLinus Torvalds 	if (!sock_flag(sk, SOCK_DEAD))
761da177e4SLinus Torvalds 		sk->sk_data_ready(sk, skbn->len);
771da177e4SLinus Torvalds 
781da177e4SLinus Torvalds 	return 0;
791da177e4SLinus Torvalds }
801da177e4SLinus Torvalds 
811da177e4SLinus Torvalds /*
821da177e4SLinus Torvalds  * State machine for state 1, Awaiting Call Accepted State.
831da177e4SLinus Torvalds  * The handling of the timer(s) is in file x25_timer.c.
841da177e4SLinus Torvalds  * Handling of state 0 and connection release is in af_x25.c.
851da177e4SLinus Torvalds  */
861da177e4SLinus Torvalds static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype)
871da177e4SLinus Torvalds {
881da177e4SLinus Torvalds 	struct x25_address source_addr, dest_addr;
891da177e4SLinus Torvalds 
901da177e4SLinus Torvalds 	switch (frametype) {
911da177e4SLinus Torvalds 		case X25_CALL_ACCEPTED: {
921da177e4SLinus Torvalds 			struct x25_sock *x25 = x25_sk(sk);
931da177e4SLinus Torvalds 
941da177e4SLinus Torvalds 			x25_stop_timer(sk);
951da177e4SLinus Torvalds 			x25->condition = 0x00;
961da177e4SLinus Torvalds 			x25->vs        = 0;
971da177e4SLinus Torvalds 			x25->va        = 0;
981da177e4SLinus Torvalds 			x25->vr        = 0;
991da177e4SLinus Torvalds 			x25->vl        = 0;
1001da177e4SLinus Torvalds 			x25->state     = X25_STATE_3;
1011da177e4SLinus Torvalds 			sk->sk_state   = TCP_ESTABLISHED;
1021da177e4SLinus Torvalds 			/*
1031da177e4SLinus Torvalds 			 *	Parse the data in the frame.
1041da177e4SLinus Torvalds 			 */
1051da177e4SLinus Torvalds 			skb_pull(skb, X25_STD_MIN_LEN);
1061da177e4SLinus Torvalds 			skb_pull(skb, x25_addr_ntoa(skb->data, &source_addr, &dest_addr));
1071da177e4SLinus Torvalds 			skb_pull(skb,
1081da177e4SLinus Torvalds 				 x25_parse_facilities(skb, &x25->facilities,
1091da177e4SLinus Torvalds 						      &x25->vc_facil_mask));
1101da177e4SLinus Torvalds 			/*
1111da177e4SLinus Torvalds 			 *	Copy any Call User Data.
1121da177e4SLinus Torvalds 			 */
1131da177e4SLinus Torvalds 			if (skb->len >= 0) {
1141da177e4SLinus Torvalds 				memcpy(x25->calluserdata.cuddata, skb->data,
1151da177e4SLinus Torvalds 				       skb->len);
1161da177e4SLinus Torvalds 				x25->calluserdata.cudlength = skb->len;
1171da177e4SLinus Torvalds 			}
1181da177e4SLinus Torvalds 			if (!sock_flag(sk, SOCK_DEAD))
1191da177e4SLinus Torvalds 				sk->sk_state_change(sk);
1201da177e4SLinus Torvalds 			break;
1211da177e4SLinus Torvalds 		}
1221da177e4SLinus Torvalds 		case X25_CLEAR_REQUEST:
1231da177e4SLinus Torvalds 			x25_write_internal(sk, X25_CLEAR_CONFIRMATION);
1241da177e4SLinus Torvalds 			x25_disconnect(sk, ECONNREFUSED, skb->data[3], skb->data[4]);
1251da177e4SLinus Torvalds 			break;
1261da177e4SLinus Torvalds 
1271da177e4SLinus Torvalds 		default:
1281da177e4SLinus Torvalds 			break;
1291da177e4SLinus Torvalds 	}
1301da177e4SLinus Torvalds 
1311da177e4SLinus Torvalds 	return 0;
1321da177e4SLinus Torvalds }
1331da177e4SLinus Torvalds 
1341da177e4SLinus Torvalds /*
1351da177e4SLinus Torvalds  * State machine for state 2, Awaiting Clear Confirmation State.
1361da177e4SLinus Torvalds  * The handling of the timer(s) is in file x25_timer.c
1371da177e4SLinus Torvalds  * Handling of state 0 and connection release is in af_x25.c.
1381da177e4SLinus Torvalds  */
1391da177e4SLinus Torvalds static int x25_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype)
1401da177e4SLinus Torvalds {
1411da177e4SLinus Torvalds 	switch (frametype) {
1421da177e4SLinus Torvalds 
1431da177e4SLinus Torvalds 		case X25_CLEAR_REQUEST:
1441da177e4SLinus Torvalds 			x25_write_internal(sk, X25_CLEAR_CONFIRMATION);
1451da177e4SLinus Torvalds 			x25_disconnect(sk, 0, skb->data[3], skb->data[4]);
1461da177e4SLinus Torvalds 			break;
1471da177e4SLinus Torvalds 
1481da177e4SLinus Torvalds 		case X25_CLEAR_CONFIRMATION:
1491da177e4SLinus Torvalds 			x25_disconnect(sk, 0, 0, 0);
1501da177e4SLinus Torvalds 			break;
1511da177e4SLinus Torvalds 
1521da177e4SLinus Torvalds 		default:
1531da177e4SLinus Torvalds 			break;
1541da177e4SLinus Torvalds 	}
1551da177e4SLinus Torvalds 
1561da177e4SLinus Torvalds 	return 0;
1571da177e4SLinus Torvalds }
1581da177e4SLinus Torvalds 
1591da177e4SLinus Torvalds /*
1601da177e4SLinus Torvalds  * State machine for state 3, Connected State.
1611da177e4SLinus Torvalds  * The handling of the timer(s) is in file x25_timer.c
1621da177e4SLinus Torvalds  * Handling of state 0 and connection release is in af_x25.c.
1631da177e4SLinus Torvalds  */
1641da177e4SLinus Torvalds static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr, int q, int d, int m)
1651da177e4SLinus Torvalds {
1661da177e4SLinus Torvalds 	int queued = 0;
1671da177e4SLinus Torvalds 	int modulus;
1681da177e4SLinus Torvalds 	struct x25_sock *x25 = x25_sk(sk);
1691da177e4SLinus Torvalds 
1701da177e4SLinus Torvalds 	modulus = (x25->neighbour->extended) ? X25_EMODULUS : X25_SMODULUS;
1711da177e4SLinus Torvalds 
1721da177e4SLinus Torvalds 	switch (frametype) {
1731da177e4SLinus Torvalds 
1741da177e4SLinus Torvalds 		case X25_RESET_REQUEST:
1751da177e4SLinus Torvalds 			x25_write_internal(sk, X25_RESET_CONFIRMATION);
1761da177e4SLinus Torvalds 			x25_stop_timer(sk);
1771da177e4SLinus Torvalds 			x25->condition = 0x00;
1781da177e4SLinus Torvalds 			x25->vs        = 0;
1791da177e4SLinus Torvalds 			x25->vr        = 0;
1801da177e4SLinus Torvalds 			x25->va        = 0;
1811da177e4SLinus Torvalds 			x25->vl        = 0;
1821da177e4SLinus Torvalds 			x25_requeue_frames(sk);
1831da177e4SLinus Torvalds 			break;
1841da177e4SLinus Torvalds 
1851da177e4SLinus Torvalds 		case X25_CLEAR_REQUEST:
1861da177e4SLinus Torvalds 			x25_write_internal(sk, X25_CLEAR_CONFIRMATION);
1871da177e4SLinus Torvalds 			x25_disconnect(sk, 0, skb->data[3], skb->data[4]);
1881da177e4SLinus Torvalds 			break;
1891da177e4SLinus Torvalds 
1901da177e4SLinus Torvalds 		case X25_RR:
1911da177e4SLinus Torvalds 		case X25_RNR:
1921da177e4SLinus Torvalds 			if (!x25_validate_nr(sk, nr)) {
1931da177e4SLinus Torvalds 				x25_clear_queues(sk);
1941da177e4SLinus Torvalds 				x25_write_internal(sk, X25_RESET_REQUEST);
1951da177e4SLinus Torvalds 				x25_start_t22timer(sk);
1961da177e4SLinus Torvalds 				x25->condition = 0x00;
1971da177e4SLinus Torvalds 				x25->vs        = 0;
1981da177e4SLinus Torvalds 				x25->vr        = 0;
1991da177e4SLinus Torvalds 				x25->va        = 0;
2001da177e4SLinus Torvalds 				x25->vl        = 0;
2011da177e4SLinus Torvalds 				x25->state     = X25_STATE_4;
2021da177e4SLinus Torvalds 			} else {
2031da177e4SLinus Torvalds 				x25_frames_acked(sk, nr);
2041da177e4SLinus Torvalds 				if (frametype == X25_RNR) {
2051da177e4SLinus Torvalds 					x25->condition |= X25_COND_PEER_RX_BUSY;
2061da177e4SLinus Torvalds 				} else {
2071da177e4SLinus Torvalds 					x25->condition &= ~X25_COND_PEER_RX_BUSY;
2081da177e4SLinus Torvalds 				}
2091da177e4SLinus Torvalds 			}
2101da177e4SLinus Torvalds 			break;
2111da177e4SLinus Torvalds 
2121da177e4SLinus Torvalds 		case X25_DATA:	/* XXX */
2131da177e4SLinus Torvalds 			x25->condition &= ~X25_COND_PEER_RX_BUSY;
2141da177e4SLinus Torvalds 			if ((ns != x25->vr) || !x25_validate_nr(sk, nr)) {
2151da177e4SLinus Torvalds 				x25_clear_queues(sk);
2161da177e4SLinus Torvalds 				x25_write_internal(sk, X25_RESET_REQUEST);
2171da177e4SLinus Torvalds 				x25_start_t22timer(sk);
2181da177e4SLinus Torvalds 				x25->condition = 0x00;
2191da177e4SLinus Torvalds 				x25->vs        = 0;
2201da177e4SLinus Torvalds 				x25->vr        = 0;
2211da177e4SLinus Torvalds 				x25->va        = 0;
2221da177e4SLinus Torvalds 				x25->vl        = 0;
2231da177e4SLinus Torvalds 				x25->state     = X25_STATE_4;
2241da177e4SLinus Torvalds 				break;
2251da177e4SLinus Torvalds 			}
2261da177e4SLinus Torvalds 			x25_frames_acked(sk, nr);
2271da177e4SLinus Torvalds 			if (ns == x25->vr) {
2281da177e4SLinus Torvalds 				if (x25_queue_rx_frame(sk, skb, m) == 0) {
2291da177e4SLinus Torvalds 					x25->vr = (x25->vr + 1) % modulus;
2301da177e4SLinus Torvalds 					queued = 1;
2311da177e4SLinus Torvalds 				} else {
2321da177e4SLinus Torvalds 					/* Should never happen */
2331da177e4SLinus Torvalds 					x25_clear_queues(sk);
2341da177e4SLinus Torvalds 					x25_write_internal(sk, X25_RESET_REQUEST);
2351da177e4SLinus Torvalds 					x25_start_t22timer(sk);
2361da177e4SLinus Torvalds 					x25->condition = 0x00;
2371da177e4SLinus Torvalds 					x25->vs        = 0;
2381da177e4SLinus Torvalds 					x25->vr        = 0;
2391da177e4SLinus Torvalds 					x25->va        = 0;
2401da177e4SLinus Torvalds 					x25->vl        = 0;
2411da177e4SLinus Torvalds 					x25->state     = X25_STATE_4;
2421da177e4SLinus Torvalds 					break;
2431da177e4SLinus Torvalds 				}
2441da177e4SLinus Torvalds 				if (atomic_read(&sk->sk_rmem_alloc) >
2451da177e4SLinus Torvalds 				    (sk->sk_rcvbuf / 2))
2461da177e4SLinus Torvalds 					x25->condition |= X25_COND_OWN_RX_BUSY;
2471da177e4SLinus Torvalds 			}
2481da177e4SLinus Torvalds 			/*
2491da177e4SLinus Torvalds 			 *	If the window is full Ack it immediately, else
2501da177e4SLinus Torvalds 			 *	start the holdback timer.
2511da177e4SLinus Torvalds 			 */
2521da177e4SLinus Torvalds 			if (((x25->vl + x25->facilities.winsize_in) % modulus) == x25->vr) {
2531da177e4SLinus Torvalds 				x25->condition &= ~X25_COND_ACK_PENDING;
2541da177e4SLinus Torvalds 				x25_stop_timer(sk);
2551da177e4SLinus Torvalds 				x25_enquiry_response(sk);
2561da177e4SLinus Torvalds 			} else {
2571da177e4SLinus Torvalds 				x25->condition |= X25_COND_ACK_PENDING;
2581da177e4SLinus Torvalds 				x25_start_t2timer(sk);
2591da177e4SLinus Torvalds 			}
2601da177e4SLinus Torvalds 			break;
2611da177e4SLinus Torvalds 
2621da177e4SLinus Torvalds 		case X25_INTERRUPT_CONFIRMATION:
2631da177e4SLinus Torvalds 			x25->intflag = 0;
2641da177e4SLinus Torvalds 			break;
2651da177e4SLinus Torvalds 
2661da177e4SLinus Torvalds 		case X25_INTERRUPT:
2671da177e4SLinus Torvalds 			if (sock_flag(sk, SOCK_URGINLINE))
2681da177e4SLinus Torvalds 				queued = !sock_queue_rcv_skb(sk, skb);
2691da177e4SLinus Torvalds 			else {
2701da177e4SLinus Torvalds 				skb_set_owner_r(skb, sk);
2711da177e4SLinus Torvalds 				skb_queue_tail(&x25->interrupt_in_queue, skb);
2721da177e4SLinus Torvalds 				queued = 1;
2731da177e4SLinus Torvalds 			}
2741da177e4SLinus Torvalds 			sk_send_sigurg(sk);
2751da177e4SLinus Torvalds 			x25_write_internal(sk, X25_INTERRUPT_CONFIRMATION);
2761da177e4SLinus Torvalds 			break;
2771da177e4SLinus Torvalds 
2781da177e4SLinus Torvalds 		default:
2791da177e4SLinus Torvalds 			printk(KERN_WARNING "x25: unknown %02X in state 3\n", frametype);
2801da177e4SLinus Torvalds 			break;
2811da177e4SLinus Torvalds 	}
2821da177e4SLinus Torvalds 
2831da177e4SLinus Torvalds 	return queued;
2841da177e4SLinus Torvalds }
2851da177e4SLinus Torvalds 
2861da177e4SLinus Torvalds /*
2871da177e4SLinus Torvalds  * State machine for state 4, Awaiting Reset Confirmation State.
2881da177e4SLinus Torvalds  * The handling of the timer(s) is in file x25_timer.c
2891da177e4SLinus Torvalds  * Handling of state 0 and connection release is in af_x25.c.
2901da177e4SLinus Torvalds  */
2911da177e4SLinus Torvalds static int x25_state4_machine(struct sock *sk, struct sk_buff *skb, int frametype)
2921da177e4SLinus Torvalds {
2931da177e4SLinus Torvalds 	switch (frametype) {
2941da177e4SLinus Torvalds 
2951da177e4SLinus Torvalds 		case X25_RESET_REQUEST:
2961da177e4SLinus Torvalds 			x25_write_internal(sk, X25_RESET_CONFIRMATION);
2971da177e4SLinus Torvalds 		case X25_RESET_CONFIRMATION: {
2981da177e4SLinus Torvalds 			struct x25_sock *x25 = x25_sk(sk);
2991da177e4SLinus Torvalds 
3001da177e4SLinus Torvalds 			x25_stop_timer(sk);
3011da177e4SLinus Torvalds 			x25->condition = 0x00;
3021da177e4SLinus Torvalds 			x25->va        = 0;
3031da177e4SLinus Torvalds 			x25->vr        = 0;
3041da177e4SLinus Torvalds 			x25->vs        = 0;
3051da177e4SLinus Torvalds 			x25->vl        = 0;
3061da177e4SLinus Torvalds 			x25->state     = X25_STATE_3;
3071da177e4SLinus Torvalds 			x25_requeue_frames(sk);
3081da177e4SLinus Torvalds 			break;
3091da177e4SLinus Torvalds 		}
3101da177e4SLinus Torvalds 		case X25_CLEAR_REQUEST:
3111da177e4SLinus Torvalds 			x25_write_internal(sk, X25_CLEAR_CONFIRMATION);
3121da177e4SLinus Torvalds 			x25_disconnect(sk, 0, skb->data[3], skb->data[4]);
3131da177e4SLinus Torvalds 			break;
3141da177e4SLinus Torvalds 
3151da177e4SLinus Torvalds 		default:
3161da177e4SLinus Torvalds 			break;
3171da177e4SLinus Torvalds 	}
3181da177e4SLinus Torvalds 
3191da177e4SLinus Torvalds 	return 0;
3201da177e4SLinus Torvalds }
3211da177e4SLinus Torvalds 
3221da177e4SLinus Torvalds /* Higher level upcall for a LAPB frame */
3231da177e4SLinus Torvalds int x25_process_rx_frame(struct sock *sk, struct sk_buff *skb)
3241da177e4SLinus Torvalds {
3251da177e4SLinus Torvalds 	struct x25_sock *x25 = x25_sk(sk);
3261da177e4SLinus Torvalds 	int queued = 0, frametype, ns, nr, q, d, m;
3271da177e4SLinus Torvalds 
3281da177e4SLinus Torvalds 	if (x25->state == X25_STATE_0)
3291da177e4SLinus Torvalds 		return 0;
3301da177e4SLinus Torvalds 
3311da177e4SLinus Torvalds 	frametype = x25_decode(sk, skb, &ns, &nr, &q, &d, &m);
3321da177e4SLinus Torvalds 
3331da177e4SLinus Torvalds 	switch (x25->state) {
3341da177e4SLinus Torvalds 		case X25_STATE_1:
3351da177e4SLinus Torvalds 			queued = x25_state1_machine(sk, skb, frametype);
3361da177e4SLinus Torvalds 			break;
3371da177e4SLinus Torvalds 		case X25_STATE_2:
3381da177e4SLinus Torvalds 			queued = x25_state2_machine(sk, skb, frametype);
3391da177e4SLinus Torvalds 			break;
3401da177e4SLinus Torvalds 		case X25_STATE_3:
3411da177e4SLinus Torvalds 			queued = x25_state3_machine(sk, skb, frametype, ns, nr, q, d, m);
3421da177e4SLinus Torvalds 			break;
3431da177e4SLinus Torvalds 		case X25_STATE_4:
3441da177e4SLinus Torvalds 			queued = x25_state4_machine(sk, skb, frametype);
3451da177e4SLinus Torvalds 			break;
3461da177e4SLinus Torvalds 	}
3471da177e4SLinus Torvalds 
3481da177e4SLinus Torvalds 	x25_kick(sk);
3491da177e4SLinus Torvalds 
3501da177e4SLinus Torvalds 	return queued;
3511da177e4SLinus Torvalds }
3521da177e4SLinus Torvalds 
3531da177e4SLinus Torvalds int x25_backlog_rcv(struct sock *sk, struct sk_buff *skb)
3541da177e4SLinus Torvalds {
3551da177e4SLinus Torvalds 	int queued = x25_process_rx_frame(sk, skb);
3561da177e4SLinus Torvalds 
3571da177e4SLinus Torvalds 	if (!queued)
3581da177e4SLinus Torvalds 		kfree_skb(skb);
3591da177e4SLinus Torvalds 
3601da177e4SLinus Torvalds 	return 0;
3611da177e4SLinus Torvalds }
362