diff --git a/include/haproxy/protocol-t.h b/include/haproxy/protocol-t.h index f74a2e1a6..2c5b66227 100644 --- a/include/haproxy/protocol-t.h +++ b/include/haproxy/protocol-t.h @@ -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) diff --git a/src/proto_udp.c b/src/proto_udp.c index 74408b4ec..2333b5d9e 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 * @@ -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,