Commit af8a45cb authored by Jeroen Vreeken's avatar Jeroen Vreeken Committed by David S. Miller

[NETROM]: Reserve space in socket header for AX25 header.

parent f0089edf
......@@ -204,7 +204,7 @@ int nr_init(struct net_device *dev)
dev->stop = nr_close;
dev->hard_header = nr_header;
dev->hard_header_len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + NR_NETWORK_LEN + NR_TRANSPORT_LEN;
dev->hard_header_len = NR_NETWORK_LEN + NR_TRANSPORT_LEN;
dev->addr_len = AX25_ADDR_LEN;
dev->type = ARPHRD_NETROM;
dev->rebuild_header = nr_rebuild_header;
......
......@@ -127,7 +127,7 @@ void nr_write_internal(struct sock *sk, int frametype)
unsigned char *dptr;
int len, timeout;
len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + NR_NETWORK_LEN + NR_TRANSPORT_LEN;
len = NR_NETWORK_LEN + NR_TRANSPORT_LEN;
switch (frametype & 0x0F) {
case NR_CONNREQ:
......@@ -151,7 +151,7 @@ void nr_write_internal(struct sock *sk, int frametype)
/*
* Space for AX.25 and NET/ROM network header
*/
skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + NR_NETWORK_LEN);
skb_reserve(skb, NR_NETWORK_LEN);
dptr = skb_put(skb, skb_tailroom(skb));
......@@ -219,12 +219,12 @@ void nr_transmit_refusal(struct sk_buff *skb, int mine)
unsigned char *dptr;
int len;
len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + NR_NETWORK_LEN + NR_TRANSPORT_LEN + 1;
len = NR_NETWORK_LEN + NR_TRANSPORT_LEN + 1;
if ((skbn = alloc_skb(len, GFP_ATOMIC)) == NULL)
return;
skb_reserve(skbn, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN);
skb_reserve(skbn, 0);
dptr = skb_put(skbn, NR_NETWORK_LEN + NR_TRANSPORT_LEN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment