diff options
Diffstat (limited to 'net/rose/rose_subr.c')
-rw-r--r-- | net/rose/rose_subr.c | 7 |
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; |