diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-03 14:25:49 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-03 14:25:49 +0000 |
commit | 43759fd180caf1894e10e8adc2df86f029aa63b1 (patch) | |
tree | ad2c530e324266a08b1a39f98b1e6120889b9d47 /include | |
parent | bcc3c8566cc5fcff6c39c94ac823941ad1e60b83 (diff) |
Check for spoofed DNS replies where the source-port is invalid, or the ip is not that of the nameserver we're configured to use
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4668 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/dns.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/dns.h b/include/dns.h index 41f42f46a..9d6f161df 100644 --- a/include/dns.h +++ b/include/dns.h @@ -190,7 +190,7 @@ class DNS : public Extensible static const int MAX_REQUEST_ID = 0xFFFF; /** - * Requests that are currently 'in flight + * Requests that are currently 'in flight' */ requestlist requests; @@ -220,6 +220,11 @@ class DNS : public Extensible int MakePayload(const char* name, const QueryType rr, const unsigned short rr_class, unsigned char* payload); public: + /** + * The port number DNS requests are made on, + * and replies have as a source-port number. + */ + static const int QUERY_PORT = 53; /** * Fill an rr (resource record) with data from input |