diff options
Diffstat (limited to 'net/netrom/nr_in.c')
| -rw-r--r-- | net/netrom/nr_in.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c index 64b81a79690..c3073a2ef63 100644 --- a/net/netrom/nr_in.c +++ b/net/netrom/nr_in.c @@ -12,11 +12,11 @@ #include <linux/socket.h> #include <linux/in.h> #include <linux/kernel.h> -#include <linux/sched.h> #include <linux/timer.h> #include <linux/string.h> #include <linux/sockios.h> #include <linux/net.h> +#include <linux/slab.h> #include <net/ax25.h> #include <linux/inet.h> #include <linux/netdevice.h> @@ -24,7 +24,6 @@ #include <net/sock.h> #include <net/tcp_states.h> #include <asm/uaccess.h> -#include <asm/system.h> #include <linux/fcntl.h> #include <linux/mm.h> #include <linux/interrupt.h> @@ -52,10 +51,12 @@ static int nr_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) if ((skbn = alloc_skb(nr->fraglen, GFP_ATOMIC)) == NULL) return 1; - skbn->h.raw = skbn->data; + skb_reset_transport_header(skbn); while ((skbo = skb_dequeue(&nr->frag_queue)) != NULL) { - memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len); + skb_copy_from_linear_data(skbo, + skb_put(skbn, skbo->len), + skbo->len); kfree_skb(skbo); } @@ -98,6 +99,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; } @@ -124,6 +130,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; } @@ -254,6 +265,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; } |
