Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396649

[PATCH 3.14 04/23] ipvs: correct initial offset of Call-ID header search in SIP persistence engine

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 3.14 04/23] ipvs: correct initial offset of Call-ID header search in SIP persistence engine
Date 2016-05-09 09:20 +0200
Message-ID <rwNDZ-8jo-33@gated-at.bofh.it> (permalink)
References <rwNDX-8jo-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Marco Angaroni <marcoangaroni@gmail.com>

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>

---
 net/netfilter/ipvs/ip_vs_pe_sip.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/netfilter/ipvs/ip_vs_pe_sip.c
+++ b/net/netfilter/ipvs/ip_vs_pe_sip.c
@@ -88,7 +88,7 @@ ip_vs_sip_fill_param(struct ip_vs_conn_p
 	dptr = skb->data + dataoff;
 	datalen = skb->len - dataoff;
 
-	if (get_callid(dptr, dataoff, datalen, &matchoff, &matchlen))
+	if (get_callid(dptr, 0, datalen, &matchoff, &matchlen))
 		return -EINVAL;
 
 	/* N.B: pe_data is only set on success,

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3.14 00/23] 3.14.69-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 21/23] iio: ak8975: Fix NULL pointer exception on early interrupt Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 07/23] lpfc: fix misleading indentation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 04/23] ipvs: correct initial offset of Call-ID header search in SIP persistence engine Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 22/23] Input: ads7846 - correct the value got from SPI Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 01/23] compiler-gcc: integrate the various compiler-gcc[345].h files Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
    Re: [PATCH 3.14 01/23] compiler-gcc: integrate the various  compiler-gcc[345].h files Jiri Slaby <jslaby@suse.cz> - 2016-05-11 11:30 +0200
  [PATCH 3.14 20/23] USB: serial: cp210x: add Straizona Focusers device ids Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 16/23] x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 23/23] powerpc: scan_features() updates incorrect bits for REAL_LE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 19/23] USB: serial: cp210x: add ID for Link ECU Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 12/23] batman-adv: Check skb size before using encapsulated ETH+VLAN header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 10/23] Input: zforce_ts - fix dual touch recognition Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:20 +0200
  [PATCH 3.14 09/23] ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:00 +0200
  [PATCH 3.14 18/23] ACPICA: Dispatcher: Update thread ID for recursive method calls Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:10 +0200
  [PATCH 3.14 15/23] MAINTAINERS: Remove asterisk from EFI directory names Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:10 +0200
  [PATCH 3.14 11/23] proc: prevent accessing /proc/<PID>/environ until its ready Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:10 +0200
  [PATCH 3.14 08/23] tracing: Dont display trigger file for events that cant be enabled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:10 +0200
  [PATCH 3.14 17/23] x86/sysfb_efi: Fix valid BAR address range check Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:10 +0200
  [PATCH 3.14 05/23] nbd: ratelimit error msgs after socket close Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:10 +0200
  [PATCH 3.14 02/23] compiler-gcc: disable -ftracer for __noclone functions Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 10:10 +0200
  Re: [PATCH 3.14 00/23] 3.14.69-stable review Guenter Roeck <linux@roeck-us.net> - 2016-05-09 15:30 +0200
  Re: [PATCH 3.14 00/23] 3.14.69-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-05-09 21:50 +0200

csiph-web