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

Commit 2bb491da authored by Ravinder Konka's avatar Ravinder Konka
Browse files

netfilter: Changes to handle MT call issue in SIP ALG



For MT call multiple SIP messages can be present in a
single skb. Make changes to handle multiple SIP messages
in a single skb.

Change-Id: Ia4c83fb18c0e92e8402742f50c0ef05a344e51a4
Signed-off-by: default avatarRavinder Konka <rkonka@codeaurora.org>
parent 0b492016
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -1800,13 +1800,13 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
				      SIP_HDR_CONTENT_LENGTH,
				      &matchoff, &matchlen) <= 0){
			do_not_process = true;
			content_len_exists = 0;
			goto destination;
		}

		clen = simple_strtoul(dptr + matchoff, (char **)&end, 10);
		if (dptr + matchoff == end) {
			do_not_process = true;
			goto destination;
			break;
		}

		term = false;
@@ -1817,14 +1817,10 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
				break;
			}
		}
		if (!term) {
			do_not_process = true;
			goto destination;
		}
		if (!term)
			break;

		end += strlen("\r\n\r\n") + clen;
		msglen = origlen = end - dptr;

destination:
		if (content_len_exists == 0) {
			origlen = datalen;
@@ -1885,10 +1881,9 @@ destination:
		dataoff += msglen;
		dptr	+= msglen;
		datalen  = datalen + diff - msglen;

		if (skb_is_combined)
			break;
	}

	if (skb_is_combined) {
		/* once combined skb is processed, split the skbs again The
		 * length to split at is the same as length of first skb. Any