1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

resolv: Reduce EDNS payload size to 1200 bytes [BZ #21361]

This hardens the stub resolver against fragmentation-based attacks.
This commit is contained in:
Florian Weimer
2017-04-13 13:09:38 +02:00
parent c803cb9b24
commit e14a27723c
10 changed files with 651 additions and 13 deletions

View File

@@ -25,6 +25,16 @@
__BEGIN_DECLS
/* Information about EDNS properties of a DNS query. */
struct resolv_edns_info
{
bool active;
uint8_t extended_rcode;
uint8_t version;
uint16_t flags;
uint16_t payload_size;
};
/* This struct provides context information when the response callback
specified in struct resolv_redirect_config is invoked. */
struct resolv_response_context
@@ -33,6 +43,7 @@ struct resolv_response_context
size_t query_length;
int server_index;
bool tcp;
struct resolv_edns_info edns;
};
/* This opaque struct is used to construct responses from within the