diff --git a/include/proto/proto_tcp.h b/include/proto/proto_tcp.h
index 5b6bf44..1a1dcfa 100644
--- a/include/proto/proto_tcp.h
+++ b/include/proto/proto_tcp.h
@@ -39,19 +39,19 @@
 int tcp_exec_req_rules(struct session *s);
 int smp_fetch_rdp_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int opt, const struct arg *args, struct sample *smp);
 
-/* Converts the TCP source address to a stick_table key usable for table
+/* Converts the INET/INET6 source address to a stick_table key usable for table
  * lookups. Returns either NULL if the source cannot be converted (eg: not
  * IPv4) or a pointer to the converted result in static_table_key in the
  * appropriate format (IP).
  */
-static inline struct stktable_key *tcp_src_to_stktable_key(struct session *s)
+static inline struct stktable_key *addr_to_stktable_key(struct sockaddr_storage *addr)
 {
-	switch (s->si[0].conn.addr.from.ss_family) {
+	switch (addr->ss_family) {
 	case AF_INET:
-		static_table_key.key = (void *)&((struct sockaddr_in *)&s->si[0].conn.addr.from)->sin_addr;
+		static_table_key.key = (void *)&((struct sockaddr_in *)addr)->sin_addr;
 		break;
 	case AF_INET6:
-		static_table_key.key = (void *)&((struct sockaddr_in6 *)&s->si[0].conn.addr.from)->sin6_addr;
+		static_table_key.key = (void *)&((struct sockaddr_in6 *)addr)->sin6_addr;
 		break;
 	default:
 		return NULL;
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index b61d87e..af9dbf9 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -839,7 +839,7 @@
 					 * to consider rule->act_prm->trk_ctr.type.
 					 */
 					t = rule->act_prm.trk_ctr.table.t;
-					ts = stktable_get_entry(t, tcp_src_to_stktable_key(s));
+					ts = stktable_get_entry(t, addr_to_stktable_key(&s->si[0].conn.addr.from));
 					if (ts) {
 						session_track_stkctr1(s, t, ts);
 						if (s->fe != s->be)
@@ -855,7 +855,7 @@
 					 * to consider rule->act_prm->trk_ctr.type.
 					 */
 					t = rule->act_prm.trk_ctr.table.t;
-					ts = stktable_get_entry(t, tcp_src_to_stktable_key(s));
+					ts = stktable_get_entry(t, addr_to_stktable_key(&s->si[0].conn.addr.from));
 					if (ts) {
 						session_track_stkctr2(s, t, ts);
 						if (s->fe != s->be)
@@ -1009,7 +1009,7 @@
 					 * to consider rule->act_prm->trk_ctr.type.
 					 */
 					t = rule->act_prm.trk_ctr.table.t;
-					ts = stktable_get_entry(t, tcp_src_to_stktable_key(s));
+					ts = stktable_get_entry(t, addr_to_stktable_key(&s->si[0].conn.addr.from));
 					if (ts)
 						session_track_stkctr1(s, t, ts);
 				}
@@ -1022,7 +1022,7 @@
 					 * to consider rule->act_prm->trk_ctr.type.
 					 */
 					t = rule->act_prm.trk_ctr.table.t;
-					ts = stktable_get_entry(t, tcp_src_to_stktable_key(s));
+					ts = stktable_get_entry(t, addr_to_stktable_key(&s->si[0].conn.addr.from));
 					if (ts)
 						session_track_stkctr2(s, t, ts);
 				}
diff --git a/src/session.c b/src/session.c
index 774a8a3..db13fc6 100644
--- a/src/session.c
+++ b/src/session.c
@@ -2369,7 +2369,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2429,7 +2429,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2490,7 +2490,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2546,7 +2546,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2607,7 +2607,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2627,7 +2627,7 @@
 	struct stktable_key *key;
 	void *ptr;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2696,7 +2696,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2752,7 +2752,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2813,7 +2813,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2869,7 +2869,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2930,7 +2930,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -2986,7 +2986,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -3047,7 +3047,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -3108,7 +3108,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -3171,7 +3171,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -3232,7 +3232,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
@@ -3295,7 +3295,7 @@
 {
 	struct stktable_key *key;
 
-	key = tcp_src_to_stktable_key(l4);
+	key = addr_to_stktable_key(&l4->si[0].conn.addr.from);
 	if (!key)
 		return 0;
 
