MINOR: fd: move .linger_risk into fdtab[].state

No need to keep this flag apart any more, let's merge it into the global
state. The CLI's output state was extended to 6 digits and the linger/cloned
flags moved inside the parenthesis.
diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h
index bccb1ab..7011193 100644
--- a/include/haproxy/connection.h
+++ b/include/haproxy/connection.h
@@ -178,7 +178,7 @@
 		/* we don't risk keeping ports unusable if we found the
 		 * zero from the other side.
 		 */
-		fdtab[c->handle.fd].linger_risk = 0;
+		HA_ATOMIC_AND(&fdtab[c->handle.fd].state, ~FD_LINGER_RISK);
 	}
 }
 
diff --git a/include/haproxy/fd-t.h b/include/haproxy/fd-t.h
index 97ae500..d15a977 100644
--- a/include/haproxy/fd-t.h
+++ b/include/haproxy/fd-t.h
@@ -62,6 +62,9 @@
 #define FD_POLL_ERR_BIT   11
 #define FD_POLL_HUP_BIT   12
 
+/* info/config bits */
+#define FD_LINGER_RISK_BIT 16  /* must kill lingering before closing */
+
 
 /* and flag values */
 #define FD_EV_ACTIVE_R  (1U << FD_EV_ACTIVE_R_BIT)
@@ -94,6 +97,8 @@
 #define FD_POLL_UPDT_MASK   (FD_POLL_IN | FD_POLL_PRI | FD_POLL_OUT)
 #define FD_POLL_ANY_MASK    (FD_POLL_IN | FD_POLL_PRI | FD_POLL_OUT | FD_POLL_ERR | FD_POLL_HUP)
 
+/* information/configuration flags */
+#define FD_LINGER_RISK      (1U << FD_LINGER_RISK_BIT)
 
 /* This is the value used to mark a file descriptor as dead. This value is
  * negative, this is important so that tests on fd < 0 properly match. It
@@ -142,7 +147,6 @@
 	void (*iocb)(int fd);                /* I/O handler */
 	void *owner;                         /* the connection or listener associated with this fd, NULL if closed */
 	unsigned int state;                  /* FD state for read and write directions (FD_EV_*) + FD_POLL_* */
-	unsigned char linger_risk:1;         /* 1 if we must kill lingering before closing */
 	unsigned char cloned:1;              /* 1 if a cloned socket, requires EPOLL_CTL_DEL on close */
 	unsigned char initialized:1;         /* 1 if init phase was done on this fd (e.g. set non-blocking) */
 	unsigned char et_possible:1;         /* 1 if edge-triggered is possible on this FD */
diff --git a/include/haproxy/fd.h b/include/haproxy/fd.h
index 6d6da69..df9df16 100644
--- a/include/haproxy/fd.h
+++ b/include/haproxy/fd.h
@@ -433,7 +433,6 @@
 	fdtab[fd].owner = owner;
 	fdtab[fd].iocb = iocb;
 	fdtab[fd].state = 0;
-	fdtab[fd].linger_risk = 0;
 	fdtab[fd].cloned = 0;
 	fdtab[fd].et_possible = 0;
 	fdtab[fd].exported = 0;
diff --git a/src/cli.c b/src/cli.c
index 76956e5..7c1b029 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1190,7 +1190,7 @@
 			suspicious = 1;
 
 		chunk_printf(&trash,
-			     "  %5d : st=0x%04x(R:%c%c W:%c%c %c%c%c%c%c) [%c%c] tmask=0x%lx umask=0x%lx owner=%p iocb=%p(",
+			     "  %5d : st=0x%06x(R:%c%c W:%c%c %c%c%c%c%c %c%c) tmask=0x%lx umask=0x%lx owner=%p iocb=%p(",
 			     fd,
 			     fdt.state,
 			     (fdt.state & FD_EV_READY_R)  ? 'R' : 'r',
@@ -1202,7 +1202,7 @@
 			     (fdt.state & FD_POLL_OUT) ? 'O' : 'o',
 			     (fdt.state & FD_POLL_PRI) ? 'P' : 'p',
 			     (fdt.state & FD_POLL_IN)  ? 'I' : 'i',
-			     fdt.linger_risk ? 'L' : 'l',
+			     (fdt.state & FD_LINGER_RISK) ? 'L' : 'l',
 			     fdt.cloned ? 'C' : 'c',
 			     fdt.thread_mask, fdt.update_mask,
 			     fdt.owner,
diff --git a/src/fd.c b/src/fd.c
index f206d2a..e29814b 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -302,7 +302,7 @@
  */
 void _fd_delete_orphan(int fd)
 {
-	if (fdtab[fd].linger_risk) {
+	if (fdtab[fd].state & FD_LINGER_RISK) {
 		/* this is generally set when connecting to servers */
 		DISGUISE(setsockopt(fd, SOL_SOCKET, SO_LINGER,
 			   (struct linger *) &nolinger, sizeof(struct linger)));
diff --git a/src/proto_quic.c b/src/proto_quic.c
index dac7c23..1cac5ab 100644
--- a/src/proto_quic.c
+++ b/src/proto_quic.c
@@ -497,7 +497,7 @@
 	conn->flags |= CO_FL_ADDR_TO_SET;
 
 	conn_ctrl_init(conn);       /* registers the FD */
-	fdtab[fd].linger_risk = 1;  /* close hard if needed */
+	HA_ATOMIC_OR(&fdtab[fd].state, FD_LINGER_RISK);  /* close hard if needed */
 
 	if (conn->flags & CO_FL_WAIT_L4_CONN) {
 		fd_want_send(fd);
diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c
index 48659c7..0cb9ab1 100644
--- a/src/proto_sockpair.c
+++ b/src/proto_sockpair.c
@@ -362,7 +362,7 @@
 		conn->flags |= CO_FL_SEND_PROXY;
 
 	conn_ctrl_init(conn);       /* registers the FD */
-	fdtab[fd].linger_risk = 0;  /* no need to disable lingering */
+	HA_ATOMIC_AND(&fdtab[fd].state, ~FD_LINGER_RISK);  /* no need to disable lingering */
 
 	return SF_ERR_NONE;  /* connection is OK */
 }
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 1317d31..1edbea4 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -557,7 +557,7 @@
 	conn->flags |= CO_FL_ADDR_TO_SET;
 
 	conn_ctrl_init(conn);       /* registers the FD */
-	fdtab[fd].linger_risk = 1;  /* close hard if needed */
+	HA_ATOMIC_OR(&fdtab[fd].state, FD_LINGER_RISK);  /* close hard if needed */
 
 	if (conn->flags & CO_FL_WAIT_L4_CONN) {
 		fd_want_send(fd);
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index 8156eb8..efa7af9 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -346,7 +346,7 @@
 		conn->flags |= CO_FL_SEND_PROXY;
 
 	conn_ctrl_init(conn);       /* registers the FD */
-	fdtab[fd].linger_risk = 0;  /* no need to disable lingering */
+	HA_ATOMIC_AND(&fdtab[fd].state, ~FD_LINGER_RISK);  /* no need to disable lingering */
 
 	if (conn->flags & CO_FL_WAIT_L4_CONN) {
 		fd_want_send(fd);
diff --git a/src/raw_sock.c b/src/raw_sock.c
index 6d5c885..a078f2d 100644
--- a/src/raw_sock.c
+++ b/src/raw_sock.c
@@ -285,7 +285,7 @@
 				if (fdtab[conn->handle.fd].state & FD_POLL_HUP)
 					goto read0;
 
-				if ((!fdtab[conn->handle.fd].linger_risk) ||
+				if (!(fdtab[conn->handle.fd].state & FD_LINGER_RISK) ||
 				    (cur_poller.flags & HAP_POLL_F_RDHUP)) {
 					break;
 				}
diff --git a/src/session.c b/src/session.c
index f78c2df..f4593ba 100644
--- a/src/session.c
+++ b/src/session.c
@@ -209,7 +209,7 @@
 		}
 
 		if (p->options & PR_O_TCP_NOLING)
-			fdtab[cfd].linger_risk = 1;
+			HA_ATOMIC_OR(&fdtab[cfd].state, FD_LINGER_RISK);
 
 #if defined(TCP_MAXSEG)
 		if (l->maxseg < 0) {
diff --git a/src/sock.c b/src/sock.c
index 19191c8..14b15a3 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -726,8 +726,8 @@
 	/* Write error on the file descriptor. Report it to the connection
 	 * and disable polling on this FD.
 	 */
-	fdtab[fd].linger_risk = 0;
 	conn->flags |= CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH;
+	HA_ATOMIC_AND(&fdtab[fd].state, ~FD_LINGER_RISK);
 	fd_stop_both(fd);
 	return 0;
 
@@ -870,7 +870,7 @@
 
  shut:
 	/* we're certain the connection was shut down */
-	fdtab[fd].linger_risk = 0;
+	HA_ATOMIC_AND(&fdtab[fd].state, ~FD_LINGER_RISK);
 	return 1;
 }
 
diff --git a/src/tcp_act.c b/src/tcp_act.c
index 46157c1..fb6b82f 100644
--- a/src/tcp_act.c
+++ b/src/tcp_act.c
@@ -194,7 +194,7 @@
 	/* We're on the client-facing side, we must force to disable lingering to
 	 * ensure we will use an RST exclusively and kill any pending data.
 	 */
-	fdtab[conn->handle.fd].linger_risk = 1;
+	HA_ATOMIC_OR(&fdtab[conn->handle.fd].state, FD_LINGER_RISK);
 
 #ifdef TCP_REPAIR
 	if (setsockopt(conn->handle.fd, IPPROTO_TCP, TCP_REPAIR, &one, sizeof(one)) == 0) {
diff --git a/src/tcpcheck.c b/src/tcpcheck.c
index 52b47ee..a99ec09 100644
--- a/src/tcpcheck.c
+++ b/src/tcpcheck.c
@@ -1128,7 +1128,7 @@
 
 	if (conn_ctrl_ready(conn) && (connect->options & TCPCHK_OPT_LINGER)) {
 		/* Some servers don't like reset on close */
-		fdtab[cs->conn->handle.fd].linger_risk = 0;
+		HA_ATOMIC_AND(&fdtab[cs->conn->handle.fd].state, ~FD_LINGER_RISK);
 	}
 
 	if (conn_ctrl_ready(conn) && (conn->flags & (CO_FL_SEND_PROXY | CO_FL_SOCKS4))) {
diff --git a/src/xprt_quic.c b/src/xprt_quic.c
index 862499c..2d51a99 100644
--- a/src/xprt_quic.c
+++ b/src/xprt_quic.c
@@ -3933,7 +3933,7 @@
 				if (fdtab[conn->handle.fd].state & FD_POLL_HUP)
 					goto read0;
 
-				if ((!fdtab[conn->handle.fd].linger_risk) ||
+				if (!(fdtab[conn->handle.fd].state & FD_LINGER_RISK) ||
 				    (cur_poller.flags & HAP_POLL_F_RDHUP)) {
 					break;
 				}