From 43759fd180caf1894e10e8adc2df86f029aa63b1 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 3 Aug 2006 14:25:49 +0000 Subject: 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 --- include/dns.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3