kernel-fxtec-pro1x/net/netfilter/ipvs
Hans Schillstrom a5959d53d6 IPVS: Handle Scheduling errors.
If ip_vs_conn_fill_param_persist return an error to ip_vs_sched_persist,
this error must propagate as ignored=-1 to ip_vs_schedule().
Errors from ip_vs_conn_new() in ip_vs_sched_persist() and ip_vs_schedule()
should also return *ignored=-1;

This patch just relies on the fact that ignored is 1 before calling
ip_vs_sched_persist().

Sent from Julian:
  "The new case when ip_vs_conn_fill_param_persist fails
   should set *ignored = -1, so that we can use NF_DROP,
   see below. *ignored = -1 should be also used for ip_vs_conn_new
   failure in ip_vs_sched_persist() and ip_vs_schedule().
   The new negative value should be handled in tcp,udp,sctp"

"To summarize:

- *ignored = 1:
      protocol tried to schedule (eg. on SYN), found svc but the
      svc/scheduler decides that this packet should be accepted with
      NF_ACCEPT because it must not be scheduled.

- *ignored = 0:
      scheduler can not find destination, so try bypass or
      return ICMP and then NF_DROP (ip_vs_leave).

- *ignored = -1:
      scheduler tried to schedule but fatal error occurred, eg.
      ip_vs_conn_new failure (ENOMEM) or ip_vs_sip_fill_param
      failure such as missing Call-ID, ENOMEM on skb_linearize
      or pe_data. In this case we should return NF_DROP without
      any attempts to send ICMP with ip_vs_leave."

More or less all ideas and input to this patch is work from
Julian Anastasov

Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
2010-11-25 10:42:59 +09:00
..
ip_vs_app.c ipvs: changes related to service usecnt 2010-09-21 18:12:30 +02:00
ip_vs_conn.c IPVS: Backup, Prepare for transferring firewall marks (fwmark) to the backup daemon. 2010-11-25 10:42:58 +09:00
ip_vs_core.c IPVS: Handle Scheduling errors. 2010-11-25 10:42:59 +09:00
ip_vs_ctl.c IPVS: Backup, Prepare for transferring firewall marks (fwmark) to the backup daemon. 2010-11-25 10:42:58 +09:00
ip_vs_dh.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ip_vs_est.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ip_vs_ftp.c IPVS: Backup, Prepare for transferring firewall marks (fwmark) to the backup daemon. 2010-11-25 10:42:58 +09:00
ip_vs_lblc.c fix typos concerning "initiali[zs]e" 2010-06-16 18:05:05 +02:00
ip_vs_lblcr.c fix typos concerning "initiali[zs]e" 2010-06-16 18:05:05 +02:00
ip_vs_lc.c IPVS: use pr_err and friends instead of IP_VS_ERR and friends 2009-08-02 18:29:30 -07:00
ip_vs_nfct.c IPVS: Add struct ip_vs_conn_param 2010-10-04 22:45:24 +09:00
ip_vs_nq.c IPVS: use pr_err and friends instead of IP_VS_ERR and friends 2009-08-02 18:29:30 -07:00
ip_vs_pe.c IPVS: Add persistence engine to connection entry 2010-11-16 08:13:07 +09:00
ip_vs_pe_sip.c IPVS: skb defrag in L7 helpers 2010-11-25 10:42:58 +09:00
ip_vs_proto.c ipvs: provide address family for debugging 2010-10-21 11:04:43 +02:00
ip_vs_proto_ah_esp.c ipvs: provide address family for debugging 2010-10-21 11:04:43 +02:00
ip_vs_proto_sctp.c IPVS: Handle Scheduling errors. 2010-11-25 10:42:59 +09:00
ip_vs_proto_tcp.c IPVS: Handle Scheduling errors. 2010-11-25 10:42:59 +09:00
ip_vs_proto_udp.c IPVS: Handle Scheduling errors. 2010-11-25 10:42:59 +09:00
ip_vs_rr.c IPVS: use pr_err and friends instead of IP_VS_ERR and friends 2009-08-02 18:29:30 -07:00
ip_vs_sched.c IPVS: ip_vs_{un,}bind_scheduler NULL arguments 2010-10-04 22:45:24 +09:00
ip_vs_sed.c IPVS: use pr_err and friends instead of IP_VS_ERR and friends 2009-08-02 18:29:30 -07:00
ip_vs_sh.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ip_vs_sync.c IPVS: Backup, Prepare for transferring firewall marks (fwmark) to the backup daemon. 2010-11-25 10:42:58 +09:00
ip_vs_wlc.c IPVS: use pr_fmt 2009-07-30 14:29:44 -07:00
ip_vs_wrr.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ip_vs_xmit.c ipvs: allow transmit of GRO aggregated skbs 2010-11-16 08:13:08 +09:00
Kconfig IPVS: sip persistence engine 2010-10-04 22:45:24 +09:00
Makefile IPVS: sip persistence engine 2010-10-04 22:45:24 +09:00