[MINOR] add the "nolinger" option to disable data lingering

The following patch will give the ability to tweak socket linger mode.
You can use this option with "option nolinger" inside fronted or backend
configuration declaration.

This will help in environments where lots of FIN_WAIT sockets are
encountered.
diff --git a/src/backend.c b/src/backend.c
index da8b8ac..91c0b34 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -408,6 +408,9 @@
 	if (s->be->options & PR_O_TCP_SRV_KA)
 		setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &one, sizeof(one));
 
+	if (s->be->options & PR_O_TCP_NOLING)
+		setsockopt(fd, SOL_SOCKET, SO_LINGER, (struct linger *) &nolinger, sizeof(struct linger));
+
 	/* allow specific binding :
 	 * - server-specific at first
 	 * - proxy-specific next
diff --git a/src/cfgparse.c b/src/cfgparse.c
index e361356..19b2ee7 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -92,6 +92,7 @@
 	{ "redispatch",   PR_O_REDISP,     PR_CAP_BE, 0 },
 	{ "keepalive",    PR_O_KEEPALIVE,  PR_CAP_NONE, 0 },
 	{ "httpclose",    PR_O_HTTP_CLOSE, PR_CAP_FE | PR_CAP_BE, 0 },
+	{ "nolinger",     PR_O_TCP_NOLING, PR_CAP_FE | PR_CAP_BE, 0 },
 	{ "logasap",      PR_O_LOGASAP,    PR_CAP_FE, 0 },
 	{ "abortonclose", PR_O_ABRT_CLOSE, PR_CAP_BE, 0 },
 	{ "checkcache",   PR_O_CHK_CACHE,  PR_CAP_BE, 0 },
diff --git a/src/client.c b/src/client.c
index 87495a4..1f58154 100644
--- a/src/client.c
+++ b/src/client.c
@@ -165,6 +165,9 @@
 		if (p->options & PR_O_TCP_CLI_KA)
 			setsockopt(cfd, SOL_SOCKET, SO_KEEPALIVE, (char *) &one, sizeof(one));
 
+		if (p->options & PR_O_TCP_NOLING)
+			setsockopt(cfd, SOL_SOCKET, SO_LINGER, (struct linger *) &nolinger, sizeof(struct linger));
+
 		t->wq = NULL;
 		t->qlist.p = NULL;
 		t->state = TASK_IDLE;
diff --git a/src/haproxy.c b/src/haproxy.c
index fc0cda1..4437d45 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -135,6 +135,7 @@
 
 const int zero = 0;
 const int one = 1;
+const struct linger nolinger = { .l_onoff = 1, .l_linger = 0 };
 
 /*
  * Syslog facilities and levels. Conforming to RFC3164.
diff --git a/src/proxy.c b/src/proxy.c
index 7d4b2ec..bd33c84 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -26,6 +26,7 @@
 #include <types/polling.h>
 
 #include <proto/client.h>
+#include <proto/backend.h>
 #include <proto/fd.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
@@ -113,6 +114,9 @@
 				Alert("cannot do so_reuseaddr for proxy %s. Continuing.\n",
 				      curproxy->id);
 			}
+
+			if (curproxy->options & PR_O_TCP_NOLING)
+				setsockopt(fd, SOL_SOCKET, SO_LINGER, (struct linger *) &nolinger, sizeof(struct linger));
 	
 #ifdef SO_REUSEPORT
 			/* OpenBSD supports this. As it's present in old libc versions of Linux,