]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
ipvs: correct initial offset of Call-ID header search in SIP persistence engine
authorMarco Angaroni <marcoangaroni@gmail.com>
Sat, 5 Mar 2016 11:10:02 +0000 (12:10 +0100)
committerKamal Mostafa <kamal@canonical.com>
Mon, 16 May 2016 17:27:42 +0000 (10:27 -0700)
commit24723f1b1c35bfd721714bf6a341ce9b3c8a4880
tree6db45fea7e7fcde32aa6537401bb7d752e8594dd
parent47089f78b7168f083607d0cafcb998c42f62e475
ipvs: correct initial offset of Call-ID header search in SIP persistence engine

BugLink: http://bugs.launchpad.net/bugs/1580754
commit 7617a24f83b5d67f4dab1844956be1cebc44aec8 upstream.

The IPVS SIP persistence engine is not able to parse the SIP header
"Call-ID" when such header is inserted in the first positions of
the SIP message.

When IPVS is configured with "--pe sip" option, like for example:
ipvsadm -A -u 1.2.3.4:5060 -s rr --pe sip -p 120 -o
some particular messages (see below for details) do not create entries
in the connection template table, which can be listed with:
ipvsadm -Lcn --persistent-conn

Problematic SIP messages are SIP responses having "Call-ID" header
positioned just after message first line:
SIP/2.0 200 OK
[Call-ID header here]
[rest of the headers]

When "Call-ID" header is positioned down (after a few other headers)
it is correctly recognized.

This is due to the data offset used in get_callid function call inside
ip_vs_pe_sip.c file: since dptr already points to the start of the
SIP message, the value of dataoff should be initially 0.
Otherwise the header is searched starting from some bytes after the
first character of the SIP message.

Fixes: 758ff0338722 ("IPVS: sip persistence engine")
Signed-off-by: Marco Angaroni <marcoangaroni@gmail.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
net/netfilter/ipvs/ip_vs_pe_sip.c