From: Patrick McHardy Date: Tue, 14 Aug 2007 20:14:35 +0000 (-0700) Subject: [NETFILTER]: nf_conntrack_sip: fix SIP-URI parsing X-Git-Tag: MMI-PSA29.97-13-9~40762^2~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa584eda5d2002097de9f608b362d9150730abd7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 Signed-off-by: David S. Miller --- 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, 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. @@ -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); }