[SR-Dev] git:ser_core_cvs: tcp: added missing blacklist on write pollerr

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Apr 23 12:51:08 CEST 2009


Module: sip-router
Branch: ser_core_cvs
Commit: fb751cbfd2713f9d36156d4fc30f4499022a1390
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fb751cbfd2713f9d36156d4fc30f4499022a1390

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Thu Apr 23 08:56:00 2009 +0000

tcp: added missing blacklist on write pollerr

Reported-and-tested-by: Vladimir Marek <vlada at iptel.org>

---

 tcp_main.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tcp_main.c b/tcp_main.c
index 4f93154..21c4c80 100644
--- a/tcp_main.c
+++ b/tcp_main.c
@@ -3499,11 +3499,21 @@ inline static int handle_tcpconn_ev(struct tcp_connection* tcpconn, short ev,
 			}
 			if (unlikely(ev & POLLERR)){
 				if (unlikely(tcpconn->state=S_CONN_CONNECT)){
+#ifdef USE_DST_BLACKLIST
+					if (cfg_get(core, core_cfg, use_dst_blacklist))
+						dst_blacklist_su(BLST_ERR_CONNECT, tcpconn->rcv.proto,
+											&tcpconn->rcv.src_su, 0);
+#endif /* USE_DST_BLACKLIST */
 					TCP_EV_CONNECT_ERR(0, TCP_LADDR(tcpconn),
 										TCP_LPORT(tcpconn), TCP_PSU(tcpconn),
 										TCP_PROTO(tcpconn));
 					TCP_STATS_CONNECT_FAILED();
 				}else{
+#ifdef USE_DST_BLACKLIST
+					if (cfg_get(core, core_cfg, use_dst_blacklist))
+						dst_blacklist_su(BLST_ERR_SEND, tcpconn->rcv.proto,
+											&tcpconn->rcv.src_su, 0);
+#endif /* USE_DST_BLACKLIST */
 					TCP_STATS_CON_RESET(); /* FIXME: it could != RST */
 				}
 			}




More information about the sr-dev mailing list