Skip to content

Commit

Permalink
[NETFILTER]: nf_conntrack_sip: fix SIP-URI parsing
Browse files Browse the repository at this point in the history
The userinfo component of a SIP-URI is optional, continue parsing at the
beginning of the SIP-URI in case its not found.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Aug 14, 2007
1 parent 465f90a commit aa584ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/netfilter/nf_conntrack_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ static int epaddr_len(struct nf_conn *ct, const char *dptr,
static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
const char *limit, int *shift)
{
const char *start = dptr;
int s = *shift;

/* Search for @, but stop at the end of the line.
Expand All @@ -309,8 +310,10 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
if (dptr <= limit && *dptr == '@') {
dptr++;
(*shift)++;
} else
} else {
dptr = start;
*shift = s;
}

return epaddr_len(ct, dptr, limit, shift);
}
Expand Down

0 comments on commit aa584ed

Please sign in to comment.