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_*.
This commit is contained in:
Willy Tarreau 2020-09-16 21:58:52 +02:00
parent b2ffc99bbd
commit 2b5e0d8b6a
2 changed files with 4 additions and 6 deletions

View File

@ -39,9 +39,7 @@ struct connection;
*/
#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)

View File

@ -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 @@ static struct protocol proto_udp4 = {
.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 @@ static struct protocol proto_udp6 = {
.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,