aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/unicast.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index cbf022cb3121..9b2a222518f7 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -226,6 +226,7 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
226 int ucf_hdr_len = sizeof(struct unicast_frag_packet); 226 int ucf_hdr_len = sizeof(struct unicast_frag_packet);
227 int data_len = skb->len - uc_hdr_len; 227 int data_len = skb->len - uc_hdr_len;
228 int large_tail = 0; 228 int large_tail = 0;
229 uint16_t seqno;
229 230
230 if (!bat_priv->primary_if) 231 if (!bat_priv->primary_if)
231 goto dropped; 232 goto dropped;
@@ -261,10 +262,9 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
261 frag1->flags = UNI_FRAG_HEAD | large_tail; 262 frag1->flags = UNI_FRAG_HEAD | large_tail;
262 frag2->flags = large_tail; 263 frag2->flags = large_tail;
263 264
264 frag1->seqno = htons((uint16_t)atomic_inc_return( 265 seqno = atomic_add_return(2, &batman_if->frag_seqno);
265 &batman_if->frag_seqno)); 266 frag1->seqno = htons(seqno - 1);
266 frag2->seqno = htons((uint16_t)atomic_inc_return( 267 frag2->seqno = htons(seqno);
267 &batman_if->frag_seqno));
268 268
269 send_skb_packet(skb, batman_if, dstaddr); 269 send_skb_packet(skb, batman_if, dstaddr);
270 send_skb_packet(frag_skb, batman_if, dstaddr); 270 send_skb_packet(frag_skb, batman_if, dstaddr);