summaryrefslogtreecommitdiffstats
path: root/net/rose/rose_subr.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2015-06-24 04:23:46 +0200
committerRalf Baechle <ralf@linux-mips.org>2015-06-24 10:03:18 +0200
commite5067d7cd967cb17067de24a162306b79f432b20 (patch)
tree541f101762df32a5742bec354009986a96d8e564 /net/rose/rose_subr.c
parent86a981e836404006efc35881ebf3d5ae36925e82 (diff)
Import newax25-2.4.3.patch.1.bz2HEADnewax25-2.4.3-1
And cleanup the *.orig and *.rej files and whitespace errors that are part of the original patch. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'net/rose/rose_subr.c')
-rw-r--r--net/rose/rose_subr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/rose/rose_subr.c b/net/rose/rose_subr.c
index 384347a0e..f881e5da5 100644
--- a/net/rose/rose_subr.c
+++ b/net/rose/rose_subr.c
@@ -119,8 +119,9 @@ void rose_write_internal(struct sock *sk, int frametype)
unsigned char lci1, lci2;
char buffer[100];
int len, faclen = 0;
+ int ax25_header_len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + 1;
- len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 1;
+ len = ax25_header_len + ROSE_MIN_LEN;
switch (frametype) {
case ROSE_CALL_REQUEST:
@@ -141,9 +142,9 @@ void rose_write_internal(struct sock *sk, int frametype)
/*
* Space for AX.25 header and PID.
*/
- skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + 1);
+ skb_reserve(skb, ax25_header_len);
- dptr = skb_put(skb, skb_tailroom(skb));
+ dptr = skb_put(skb, len - ax25_header_len);
lci1 = (sk->protinfo.rose->lci >> 8) & 0x0F;
lci2 = (sk->protinfo.rose->lci >> 0) & 0xFF;