aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ax25/ax25_out.c')
-rw-r--r--net/ax25/ax25_out.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index 223835092b7a..92b517af7260 100644
--- a/net/ax25/ax25_out.c
+++ b/net/ax25/ax25_out.c
@@ -148,8 +148,9 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
148 148
149 if (ka9qfrag == 1) { 149 if (ka9qfrag == 1) {
150 skb_reserve(skbn, frontlen + 2); 150 skb_reserve(skbn, frontlen + 2);
151 skbn->nh.raw = skbn->data + (skb->nh.raw - skb->data); 151 skb_set_network_header(skbn,
152 memcpy(skb_put(skbn, len), skb->data, len); 152 skb_network_offset(skb));
153 skb_copy_from_linear_data(skb, skb_put(skbn, len), len);
153 p = skb_push(skbn, 2); 154 p = skb_push(skbn, 2);
154 155
155 *p++ = AX25_P_SEGMENT; 156 *p++ = AX25_P_SEGMENT;
@@ -161,8 +162,9 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
161 } 162 }
162 } else { 163 } else {
163 skb_reserve(skbn, frontlen + 1); 164 skb_reserve(skbn, frontlen + 1);
164 skbn->nh.raw = skbn->data + (skb->nh.raw - skb->data); 165 skb_set_network_header(skbn,
165 memcpy(skb_put(skbn, len), skb->data, len); 166 skb_network_offset(skb));
167 skb_copy_from_linear_data(skb, skb_put(skbn, len), len);
166 p = skb_push(skbn, 1); 168 p = skb_push(skbn, 1);
167 *p = AX25_P_TEXT; 169 *p = AX25_P_TEXT;
168 } 170 }
@@ -205,7 +207,7 @@ static void ax25_send_iframe(ax25_cb *ax25, struct sk_buff *skb, int poll_bit)
205 if (skb == NULL) 207 if (skb == NULL)
206 return; 208 return;
207 209
208 skb->nh.raw = skb->data; 210 skb_reset_network_header(skb);
209 211
210 if (ax25->modulus == AX25_MODULUS) { 212 if (ax25->modulus == AX25_MODULUS) {
211 frame = skb_push(skb, 1); 213 frame = skb_push(skb, 1);