linux/net/netfilter/ipvs
Marco Angaroni 5020843db3 ipvs: correct initial offset of Call-ID header search in SIP persistence engine
commit 7617a24f83 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: 758ff03387 ("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: Ben Hutchings <ben@decadent.org.uk>
History 2016-05-01 00:05:54 +02:00
..
ip_vs_app.c ipvs: do not disable bh for long time 2013-04-02 00:23:58 +02:00
ip_vs_conn.c ipvs: avoid netns exit crash on ip_vs_conn_drop_conntrack 2014-07-16 09:39:28 +09:00
ip_vs_core.c ipvs: fix crash if scheduler is changed 2015-08-25 10:13:48 +01:00
ip_vs_ctl.c ipvs: fix crash if scheduler is changed 2015-08-25 10:13:48 +01:00
ip_vs_dh.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_est.c ipvs: stats should not depend on CPU 0 2013-09-18 14:40:20 -05:00
ip_vs_ftp.c ipvs: uninitialized data with IP_VS_IPV6 2015-02-02 10:01:01 +00:00
ip_vs_lblc.c ipvs: Reduce checkpatch noise in ip_vs_lblc.c 2014-03-07 12:36:21 +09:00
ip_vs_lblcr.c ipvs: avoid rcu_barrier during netns cleanup 2013-10-15 10:36:01 +09:00
ip_vs_lc.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_nfct.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-06 17:37:45 -05:00
ip_vs_nq.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_pe.c ipvs: convert services to rcu 2013-04-02 00:23:58 +02:00
ip_vs_pe_sip.c ipvs: correct initial offset of Call-ID header search in SIP persistence engine 2016-05-01 00:05:54 +02:00
ip_vs_proto.c ipvs: Trivial changes, use compressed IPv6 address in output 2012-09-28 11:33:52 +09:00
ip_vs_proto_ah_esp.c ipvs: API change to avoid rescan of IPv6 exthdr 2012-09-28 11:34:33 +09:00
ip_vs_proto_sctp.c net: ipvs: sctp: do not recalc sctp csum when ports didn't change 2013-10-30 09:48:16 +09:00
ip_vs_proto_tcp.c ipvs: sloppy TCP and SCTP 2013-06-26 18:01:46 +09:00
ip_vs_proto_udp.c ipvs: convert services to rcu 2013-04-02 00:23:58 +02:00
ip_vs_rr.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_sched.c ipvs: fix crash if scheduler is changed 2015-08-25 10:13:48 +01:00
ip_vs_sed.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_sh.c ipvs: improved SH fallback strategy 2013-10-15 10:54:50 +09:00
ip_vs_sync.c ipvs: fix crash with sync protocol v0 and FTP 2015-08-25 10:13:49 +01:00
ip_vs_wlc.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_wrr.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_xmit.c ipvs: do not use random local source address for tunnels 2015-08-25 10:13:47 +01:00
Kconfig ipvs: Complete IPv6 fragment handling for IPVS 2012-09-28 11:34:24 +09:00
Makefile IPVS: sip persistence engine 2010-10-04 22:45:24 +09:00