brain
9e0fd68e34
Fixed resolver, forward lookup of ipv6 doesnt work right yet
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4674 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 16:00:55 +00:00
brain
c5b4476874
Support CNAME, AAAA
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4673 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 15:49:22 +00:00
brain
0c1916945a
Fix sockaddr structs for ipv6
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4672 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 15:15:09 +00:00
brain
dd9112f8cb
Fix bindsocket to work in ipv6 mode
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4671 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 15:09:38 +00:00
brain
5405f7927e
Add some commenting
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4670 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 14:43:59 +00:00
brain
b7d632aa9a
add erroring if there are already 65536 id's in transit
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4669 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 14:42:18 +00:00
brain
43759fd180
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
2006-08-03 14:25:49 +00:00
brain
bcc3c8566c
Properly check for duplicate dns id's from the PRNG
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4667 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 13:46:42 +00:00
brain
30911b2ae8
Improve PRNG
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4666 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 13:28:12 +00:00
brain
c6934754b0
Dynamically generate 004 numeric from the modehandler list
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4665 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 11:17:03 +00:00
brain
7da8ae0706
Added comments to class DNS and typedefs
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4662 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 22:52:31 +00:00
brain
f313c36917
Pseudo-random id's again, combined with incrementing value, gettimeofday and geteuid using xor
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4661 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 22:07:43 +00:00
brain
d06e02bc30
Add back stats counters for dns total, good and bad
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4660 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 21:46:22 +00:00
brain
be9ffd2430
Allocate request id's in sequence, which means we wont get a duplicate id until 65536 id's have been given out.
...
Much safer than rand()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4659 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 21:39:12 +00:00
brain
daf12f4d06
Change to a const
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4658 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 21:26:49 +00:00
brain
79da8ad27e
Change more names and types
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4657 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 21:06:44 +00:00
brain
c47d3335e7
Absolutely everything is now part of class DNS, or class Resolver.
...
This means our dns code is totally encapsulated and we know that
changing it wont effect anything else so long as the interface stays
the same.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4656 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 20:54:39 +00:00
brain
acff2ca6dc
More tidying
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4655 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 20:44:46 +00:00
brain
a4b7833073
Move more stuff into private members of class DNS
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4654 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 20:34:23 +00:00
brain
c0526f1dc2
Tidyups, rename some vars
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4653 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 20:16:25 +00:00
brain
e5ab44198d
Made MasterSocket static
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4652 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 20:06:50 +00:00
brain
4d941f1b7a
Move more stuff into class DNS
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4651 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 19:59:06 +00:00
brain
4bc3065d05
Tweak case of all classes to match those in the rest of the core
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4650 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 19:15:22 +00:00
brain
200d4f2d23
Change comment at start of the file, rename dns_connection
...
to dns_request (they no longer represent connections with
unique FD's so the old name was kind of silly)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4649 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 19:07:12 +00:00
brain
93420ae6c6
Change a message
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4648 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 19:00:15 +00:00
brain
2280358b7b
More tidying. Add comments. More comments to do :p
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4647 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 18:55:10 +00:00
brain
e65b2c70e4
Add error messages to Resolver::OnError()
...
Add exception handling to several places that use Resolver (it can throw)
Remove Resolver::ProcessResult(), its now handled within the bowels of dns.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4646 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 18:44:13 +00:00
brain
29342eb557
The great summer clean (better than a spring clean)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4645 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 18:06:04 +00:00
brain
4056b3fdc5
Tidyup var names. people who use 'l' to mean 'length' need to be shot with a brick
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4644 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 17:35:47 +00:00
brain
eb982b5ad9
More tidyups
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4643 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 17:27:07 +00:00
brain
affb908232
Tidyups (as usual)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4642 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 17:19:55 +00:00
brain
9604ff62cd
More tidyups
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4641 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 17:09:40 +00:00
brain
a5c99b8dc6
Tidyup var names. If i ever meet this person who called all the firedns vars 'l' and 'c' and 'r' im going to beat them with Om's fish.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4640 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 17:06:03 +00:00
brain
5a65d2f588
Tidyup dns.cpp
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4639 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 17:03:04 +00:00
brain
5b02b8768d
Check for invalid ip's being bound to
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4638 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 12:50:41 +00:00
brain
1d6b72a5ba
(1) remove CleanAndResolve.
...
(2) remove feature of being able to bind hostnames in <bind> tags (it used CleanAndResolve) :p
(3) Fix the stuff in SpanningTree that used CleanAndResolve to validate connecting ip addresses - it now builds an 'allowed ip cache' on rehash/startup instead
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4637 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 11:50:01 +00:00
brain
5b0b077e2a
Check for duplicate servers in OnLookupComplete
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4636 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 10:36:38 +00:00
brain
21347e95fd
Comment ServernameResolver class
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4635 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 10:33:49 +00:00
brain
a54cfebb04
InspSocket no longer resolves hosts.
...
InspSocket::DoResolve() and the stuff that calls it is gone, if you pass InspSocket an invalid ip, it will bail during its connect.
You must now use Resolver classes to resolve hostnames into IP addresses, if you wish to do this. Currently, only one non-extra module
does this, see class ServernameResolver within m_spanningtree
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4634 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 10:26:21 +00:00
brain
b4f7f64413
Change comment which referred to an fd, is now an id
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4633 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 09:13:36 +00:00
brain
b53b47ca75
Fixes
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4632 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-02 00:38:59 +00:00
brain
8521a64963
Remove dnsqueue
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4631 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 23:29:39 +00:00
brain
bc6975c361
Remove dnsqueue
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4630 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 23:29:24 +00:00
brain
e00b5b82db
Comments, add more detail, remove dnsqueue.h include from tons of places
...
Remove THREADED_DNS defines from all over the place
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4629 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 23:26:11 +00:00
brain
f44d25e8c3
Fixes
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4628 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 23:09:07 +00:00
brain
be1e2e4ee5
Fixes
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4627 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 23:07:26 +00:00
brain
e74bb16a4f
Stuff to make user host resolving use class Resolver - not tested yet
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4626 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 22:59:59 +00:00
brain
cc83231b94
Remove X_ESTAB_CLASSDNS, X_ESTAB_DNS now does the job of this (i TOLD w00t and om i was removing this eventually, and now i did :p)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4625 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 22:22:02 +00:00
brain
f368a03cf2
Remove unused vars from class DNS
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4624 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 22:21:16 +00:00
brain
ce9d870efa
Remove unused temp buffers
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4623 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 22:19:31 +00:00