]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: proto_udp: replace last AF_CUST_UDP* with AF_INET*
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2020 19:58:52 +0000 (21:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2020 20:08:08 +0000 (22:08 +0200)
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_*.

include/haproxy/protocol-t.h
src/proto_udp.c

index f74a2e1a6c72616250c17fd7c3d842bde8e88383..2c5b66227ca8d3a071c17c6bc90b43e600cce047 100644 (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)
index 74408b4ec7678f53134303881197c90027114700..2333b5d9ee3b75f01d76a3a7c573cea160ffcef9 100644 (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,