l2tp: fix race in pppol2tp_release with session object destroy
[pandora-kernel.git] / net / netfilter / nf_conntrack_sip.c
index 93faf6a..7cbf9bd 100644 (file)
@@ -1372,9 +1372,12 @@ static int process_sip_request(struct sk_buff *skb, unsigned int dataoff,
                handler = &sip_handlers[i];
                if (handler->request == NULL)
                        continue;
-               if (*datalen < handler->len ||
+               if (*datalen < handler->len + 2 ||
                    strnicmp(*dptr, handler->method, handler->len))
                        continue;
+               if ((*dptr)[handler->len] != ' ' ||
+                   !isalpha((*dptr)[handler->len+1]))
+                       continue;
 
                if (ct_sip_get_header(ct, *dptr, 0, *datalen, SIP_HDR_CSEQ,
                                      &matchoff, &matchlen) <= 0)
@@ -1468,7 +1471,7 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
 
                msglen = origlen = end - dptr;
                if (msglen > datalen)
-                       return NF_DROP;
+                       return NF_ACCEPT;
 
                ret = process_sip_msg(skb, ct, dataoff, &dptr, &msglen);
                if (ret != NF_ACCEPT)