aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-08-14 16:14:35 -0400
committerDavid S. Miller <davem@davemloft.net>2007-08-14 16:14:35 -0400
commitaa584eda5d2002097de9f608b362d9150730abd7 (patch)
tree1885f67c19755f4aba3eb20144483bb92966bf52 /net
parent465f90a486cd724d364167747e8b8b9f806fa91a (diff)
[NETFILTER]: nf_conntrack_sip: fix SIP-URI parsing
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>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_sip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 5cc9636e46e9..d449fa47491c 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -295,6 +295,7 @@ static int epaddr_len(struct nf_conn *ct, const char *dptr,
295static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, 295static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
296 const char *limit, int *shift) 296 const char *limit, int *shift)
297{ 297{
298 const char *start = dptr;
298 int s = *shift; 299 int s = *shift;
299 300
300 /* Search for @, but stop at the end of the line. 301 /* Search for @, but stop at the end of the line.
@@ -309,8 +310,10 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
309 if (dptr <= limit && *dptr == '@') { 310 if (dptr <= limit && *dptr == '@') {
310 dptr++; 311 dptr++;
311 (*shift)++; 312 (*shift)++;
312 } else 313 } else {
314 dptr = start;
313 *shift = s; 315 *shift = s;
316 }
314 317
315 return epaddr_len(ct, dptr, limit, shift); 318 return epaddr_len(ct, dptr, limit, shift);
316} 319}