55 Commits

Author SHA1 Message Date
brain
6a6f5b2275 Add missing feature: /rehash reinitializes dns subsytem (and can handle changed addresses)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6193 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-31 19:17:04 +00:00
brain
1c52b90e82 Refactor dns.cpp to use an array of request types rather than map, for O(1) lookup time
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6042 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-18 18:35:25 +00:00
w00t
696ee9ff66 And now, just to force you to recompile the *whole* ircd.. updated headers on the headers. :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5998 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15 22:18:59 +00:00
brain
7159842998 Fix all the _FORTIFY_SOURCE warnings except "punned pointer".
We CANNOT fix this, as it is the recommended (and only) way to dlsym a symbol from a .so file.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5770 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-19 00:43:35 +00:00
brain
2549304905 Add fix for patch #166 (this is a reasonably big one)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5679 e03df62e-2008-0410-955e-edbf42e46eb7
2006-11-10 20:13:59 +00:00
brain
193b540aa7 Socket error state stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5607 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-31 20:32:01 +00:00
brain
08b8c64bb6 Change around some dns stuff (dont use this yet)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5522 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-22 15:58:13 +00:00
brain
70f589ea40 Call OnError when timing out
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5520 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-22 15:18:16 +00:00
brain
e381b06561 EventHandler class, an abstraction for raw i/o
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4941 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-18 01:08:14 +00:00
brain
d7336f351d Move the socket functions like insp_ntoa into their own namespace. They arent really sensible to put into a class, but namespacing them out discourages developers from directly using them without explicitly saing 'using irc::sockets::BindPorts' or whatever first. Some functions such as insp_ntoa are already 'exposed' by headers that use them so 'using irc::sockets::inet_ntoa' isnt required.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4828 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10 00:36:07 +00:00
brain
48262da087 Change some resolver stuff.
OM, THIS STILL WONT COMPILE! Error on the same line


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4821 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09 19:25:31 +00:00
brain
e5843dde4d Add proper support for "munging" of ipv6 addresses when ::ffff:addr is used (this is temporary)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4693 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 21:45:39 +00:00
brain
327a3847ff Change comments to reflect change from ip6.int to ip6.arpa which occured on jul 1st
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4682 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 19:10:05 +00:00
brain
062bd08863 Extra stuff for forcing a v4 or v6 lookup
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4679 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 18:46:17 +00:00
brain
f16930668a Added test framework, so that i can work on improving MakeIP6Int
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4677 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 16:47:40 +00:00
brain
73fda5d362 *.ip6.int PTR lookups. FUGLY AS FUCK. someone please help me tidy (backported from firedns)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4676 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-03 16:27:16 +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
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
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
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
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
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
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
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
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
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
brain
a5c9214743 Removed threaded dns (it might make a comeback some day, but as it stands its incompatible with the new OO resolver)
Migrated to new OO resolver, removed as much firedns craq as is safe to do so, operates over one file descriptor now and keyed against request id.
The only way to use the system is via class Resolver (so i'll need to migrate the rest of the ircd to use it)


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4622 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 21:35:07 +00:00
brain
4488e47713 The IPV6 stuff compiles now, with compile-correct ipv6 code. I dont know if this works yet.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4611 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 11:46:19 +00:00
brain
c80508b28b Move to entirely using insp_sockaddr and insp_inaddr for socket stuff, first step on the road to ipv6 support
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4609 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 10:37:16 +00:00
brain
d787576389 Fix socket leak properly this time
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4405 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 13:52:10 +00:00
brain
a8b71c68dd Tiny tiny docs update, not even worth re-generating the docs for atm
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4370 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-12 16:15:00 +00:00
brain
7b41936ce8 Document class Resolver
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4369 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-12 15:35:59 +00:00
brain
d4cb72e312 Make it work:
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4357 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-12 12:43:55 +00:00
brain
b864f69ce9 Added class Resolver (needs testing)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4353 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-12 12:20:36 +00:00
brain
0b1cf0e951 Sort include dependencies of dns.h
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4294 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-10 18:24:34 +00:00
brain
3dacf1edd2 Made a load more stuff Extensible which might be of use to someone
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4293 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-10 18:22:16 +00:00
om
09dd16b981 Route some more stuff through socket.h and hash_map.h. Add #define protection to timer.h and remove some unneeded includes and externs from timer.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3869 e03df62e-2008-0410-955e-edbf42e46eb7
2006-04-10 22:50:41 +00:00
brain
3a7fa1660c Const refs (this is about the last of them in the core api)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3694 e03df62e-2008-0410-955e-edbf42e46eb7
2006-03-12 16:56:02 +00:00
brain
656e193516 *UNTESTED DO NOT USE YET* - async dns for InspSocket as test - removing requirement on nss_dns.so.1
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3017 e03df62e-2008-0410-955e-edbf42e46eb7
2006-02-02 16:34:34 +00:00
brain
898e8da565 Moved command parsing crap into command_parse.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2505 e03df62e-2008-0410-955e-edbf42e46eb7
2005-12-16 09:56:33 +00:00
brain
2e816169a4 Attempts to make DNS nicer with new socket engine
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2332 e03df62e-2008-0410-955e-edbf42e46eb7
2005-12-12 12:49:12 +00:00
brain
788085148b Tons of DNS debugging and stability fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2247 e03df62e-2008-0410-955e-edbf42e46eb7
2005-12-07 11:13:54 +00:00
brain
d56e60139a Multithreaded DNS -- not tested!!!!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2088 e03df62e-2008-0410-955e-edbf42e46eb7
2005-12-01 23:59:40 +00:00
brain
f96ddd3974 Started on -Wall - safe compile
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1570 e03df62e-2008-0410-955e-edbf42e46eb7
2005-05-30 22:36:08 +00:00