Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 757fbe88 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm-5.4: CPE crash during SIP call"

parents 6ed83faa 9f2ad37e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ static void recalc_header(struct sk_buff *skb, unsigned int skblen,
	struct tcphdr *tcph;

	/* here we recalculate ip and tcp headers */
	if (nf_ct_l3num((struct nf_conn *)skb->_nfct) == NFPROTO_IPV4) {
	if (nf_ct_l3num((struct nf_conn *)skb_nfct(skb)) == NFPROTO_IPV4) {
		/* fix IP hdr checksum information */
		ip_hdr(skb)->tot_len = htons(skblen);
		ip_send_check(ip_hdr(skb));
@@ -303,7 +303,7 @@ static void recalc_header(struct sk_buff *skb, unsigned int skblen,
	}
	datalen = skb->len - protoff;
	tcph = (struct tcphdr *)((void *)skb->data + protoff);
	nf_nat_csum_recalc(skb, nf_ct_l3num((struct nf_conn *)skb->_nfct),
	nf_nat_csum_recalc(skb, nf_ct_l3num((struct nf_conn *)skb_nfct(skb)),
			   IPPROTO_TCP, tcph, &tcph->check, datalen, oldlen);
}

@@ -1913,6 +1913,9 @@ static void sip_tcp_skb_combined_processing(bool skb_is_combined, struct sk_buff
		splitlen = (dir == IP_CT_DIR_ORIGINAL) ?
				ct->segment.skb_len[0] : ct->segment.skb_len[1];
		oldlen = combined_skb->len - protoff;
		/* Reset skb->len and skb->tail params before skb split. */
		skb->len = 0;
		skb->tail = skb->data;
		skb_split(combined_skb, skb, splitlen);
		/* Headers need to be recalculated since during SIP processing
		 * headers are calculated based on the change in length of the