From: Ulrich Weber <uweber.linux@gmail.com>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: Re: [RFC] SIP conntrack handler and TCP fragmentation
Date: Wed, 12 Oct 2016 14:27:01 +0200 [thread overview]
Message-ID: <383cd1d2-23c2-d753-09f0-ee3a5edf9ffe@gmail.com> (raw)
In-Reply-To: <20161012114140.GB26177@breakpoint.cc>
On 12.10.2016 13:41, Florian Westphal wrote:
> Ulrich Weber <uweber.linux@gmail.com> wrote:
>> From reading the code this fixed the problem when Content-Length
>> points to one of the next TCP fragments.
>
> Right.
>
>> In our case Content-Length is always 0 with a couple of SUBSCRIBE calls.
>> E.g. a TCP packet starting with this will break the SIP connection tracking:
>>
>> INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE
>> Content-Length: 0
>
> Ugh.
>
> I guess it makes sense to detect this and then accept for this case too.
>
>> The previous TCP packet was accepted by SIP connection tracking
>> because it had no Content-Length field.
>
> Perhaps we should treat Content-length of 0 like "no Conent-Length
> field".
>
Ahh, I found the root of the problem ;)
Since the payload doesnt start with SIP/2.0, its interpreted as
a response. Starting with INVITE its interpreted as an INVITE
request. Since there is no CSeq header found, its dropped then as invalid.
Possible proper solutions would be either
a) add trailing space to sip_handlers commands
b) check for trailing SIP/2.0 in request line
Do you think a or b would break existing setups?
prev parent reply other threads:[~2016-10-12 12:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 7:38 [RFC] SIP conntrack handler and TCP fragmentation Ulrich Weber
2016-10-12 7:52 ` Florian Westphal
2016-10-12 8:52 ` Ulrich Weber
2016-10-12 11:41 ` Florian Westphal
2016-10-12 12:27 ` Ulrich Weber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=383cd1d2-23c2-d753-09f0-ee3a5edf9ffe@gmail.com \
--to=uweber.linux@gmail.com \
--cc=fw@strlen.de \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).