From: Alan T. DeKok Date: Mon, 20 Jun 2022 23:28:56 +0000 (-0400) Subject: define the macro, and use the correct one for DNS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9d0d226b0eff5ee9438628ab20dc0d799b7a783;p=thirdparty%2Ffreeradius-server.git define the macro, and use the correct one for DNS --- diff --git a/src/listen/dns/proto_dns_udp.c b/src/listen/dns/proto_dns_udp.c index f5ed51c6566..180036a88c1 100644 --- a/src/listen/dns/proto_dns_udp.c +++ b/src/listen/dns/proto_dns_udp.c @@ -90,7 +90,7 @@ static const CONF_PARSER udp_listen_config[] = { { FR_CONF_POINTER("networks", FR_TYPE_SUBSECTION, NULL), .subcs = (void const *) networks_config }, { FR_CONF_OFFSET("max_packet_size", FR_TYPE_UINT32, proto_dns_udp_t, max_packet_size), .dflt = "576" } , - { FR_CONF_OFFSET("max_attributes", FR_TYPE_UINT32, proto_dns_udp_t, max_attributes), .dflt = STRINGIFY(DHCPV4_MAX_ATTRIBUTES) } , + { FR_CONF_OFFSET("max_attributes", FR_TYPE_UINT32, proto_dns_udp_t, max_attributes), .dflt = STRINGIFY(DNS_MAX_ATTRIBUTES) } , CONF_PARSER_TERMINATOR }; diff --git a/src/protocols/dhcpv4/dhcpv4.h b/src/protocols/dhcpv4/dhcpv4.h index 123924d734d..0cb08aeaa3f 100644 --- a/src/protocols/dhcpv4/dhcpv4.h +++ b/src/protocols/dhcpv4/dhcpv4.h @@ -104,6 +104,7 @@ typedef struct { #define MIN_PACKET_SIZE (244) #define DEFAULT_PACKET_SIZE (300) #define MAX_PACKET_SIZE (1500 - 40) +#define DHCPV4_MAX_ATTRIBUTES 255 #define DHCP_OPTION_FIELD (0) #define DHCP_FILE_FIELD (1) diff --git a/src/protocols/dns/dns.h b/src/protocols/dns/dns.h index a03f8a1ed9e..42921dccbea 100644 --- a/src/protocols/dns/dns.h +++ b/src/protocols/dns/dns.h @@ -32,6 +32,8 @@ extern "C" { #include #include +#define DNS_MAX_ATTRIBUTES 255 + typedef struct { uint16_t id; #ifdef WORDS_BIGENDIAN