MEDIUM: proto_udp: replace last AF_CUST_UDP* with AF_INET*
We don't need to cheat with the sock_domain anymore, we now always have
the SOCK_DGRAM sock_type as a complementary selector. This patch restores
the sock_domain to AF_INET* in the udp* protocols and removes all traces
of the now unused AF_CUST_*.
diff --git a/include/haproxy/protocol-t.h b/include/haproxy/protocol-t.h
index f74a2e1..2c5b662 100644
--- a/include/haproxy/protocol-t.h
+++ b/include/haproxy/protocol-t.h
@@ -39,9 +39,7 @@
*/
#define AF_CUST_EXISTING_FD (AF_MAX + 1)
#define AF_CUST_SOCKPAIR (AF_MAX + 2)
-#define AF_CUST_UDP4 (AF_MAX + 3)
-#define AF_CUST_UDP6 (AF_MAX + 4)
-#define AF_CUST_MAX (AF_MAX + 5)
+#define AF_CUST_MAX (AF_MAX + 3)
/*
* Test in case AF_CUST_MAX overflows the sa_family_t (unsigned int)
diff --git a/src/proto_udp.c b/src/proto_udp.c
index 74408b4..2333b5d 100644
--- a/src/proto_udp.c
+++ b/src/proto_udp.c
@@ -1,5 +1,5 @@
/*
- * AF_CUST_UDP/AF_CUST_UDP6 UDP protocol layer
+ * UDP protocol layer on top of AF_INET/AF_INET6
*
* Copyright 2019 HAProxy Technologies, Frédéric Lécaille <flecaille@haproxy.com>
*
@@ -49,7 +49,7 @@
.name = "udp4",
.fam = &proto_fam_inet4,
.ctrl_type = SOCK_DGRAM,
- .sock_domain = AF_CUST_UDP4,
+ .sock_domain = AF_INET,
.sock_type = SOCK_DGRAM,
.sock_prot = IPPROTO_UDP,
.accept = NULL,
@@ -69,7 +69,7 @@
.name = "udp6",
.fam = &proto_fam_inet6,
.ctrl_type = SOCK_DGRAM,
- .sock_domain = AF_CUST_UDP6,
+ .sock_domain = AF_INET6,
.sock_type = SOCK_DGRAM,
.sock_prot = IPPROTO_UDP,
.accept = NULL,