Commit Graph

35 Commits

Author SHA1 Message Date
Florian Westphal ed72bf4ceb resolve.c: fix valgrind 'uninitialized memory' warning
fix the following warning generated by valgrind if ipv6 is enabled:

Syscall param write(buf) points to uninitialised byte(s)
   at 0x4000982: (within /lib/ld-2.9.so)
   by 0x80681A8: Resolve_Name (resolve.c:477)
   by 0x805439F: Conn_Handler (conn.c:1658)
   by 0x804AA7C: main (ngircd.c:331)

The warning is because ng_ipaddr_t can be a union, and only the
necessary parts are initialised.  The callers know what part
of the union is valid, so this is not a bug.
2009-09-11 23:09:11 +02:00
Alexander Barton 8fd0e29d46 Fix "implicit conversion shortens 64-bit value" warning
This patch fixes the following gcc warning in our sources:
"implicit conversion shortens 64-bit value into a 32-bit value"
2009-09-11 22:52:12 +02:00
Florian Westphal 1c7b9dbe93 remove unneeded LOG_DEBUG when not compiling with DEBUG support
when ngircd is build without DEBUG enabled, LOG_DEBUG messages
are always discarded.

To avoid the extra code, ngircd has a LogDebug() wrapper which
gets removed by the compiler when compiling without DEBUG defined.

Update a few functings which were using the
Log(LOG_DEBUG, .. interface directly without #ifdef DEBUG guards.

   text	   data	    bss	    dec	    hex	filename
 127748	   1900	  28280	 157928	  268e8	ngircd.before
 126836	   1896	  28280	 157012	  26554	ngircd.after
2009-01-10 00:54:07 +01:00
Alexander Barton 4c113d8850 New configuration option "NoIdent" to disable IDENT lookups
The new configuration option "NoIdent" in ngircd.conf can be used to
disable IDENT lookups even when the ngIRCd daemon is compiled with IDENT
lookups enabled.
2008-11-19 19:11:39 +01:00
Alexander Barton 34b2f0085d Fix ForwardLookup(): "ISO C90 forbids specifying subobject to initialize"
This patch fixes the following warning of GCC (version 4.3.2) in
function ForwardLookup():

resolve.c: In function 'ForwardLookup':
resolve.c:282: warning: ISO C90 forbids specifying subobject to initialize
resolve.c:284: warning: ISO C90 forbids specifying subobject to initialize
resolve.c:285: warning: ISO C90 forbids specifying subobject to initialize
2008-10-19 20:07:35 +02:00
Florian Westphal 22fa782be7 IPv6: Add config options to disabe ipv4/ipv6 support.
This also enables ipv6-only setups.
2008-04-21 00:45:19 +02:00
Florian Westphal feb31e4200 IPv6 support.
all references to struct sockaddr/in_addr have been
removed from src/ngircd.
libngipaddr (in src/ipaddr/) hides all the gory details.
See src/ipaddr/ng_ipaddr.h for API description.
2008-02-26 23:50:35 +01:00
Florian Westphal 61e6b5c0aa [Resolver]: Use dotted-decimal IP address if hostname is >= 64 2008-01-02 11:03:29 +00:00
Florian Westphal 20ce56cc5b include <arpa/inet.h> inside tool.h
In file included from hash.c:24:
../tool/tool.h:27: warning: `struct in_addr' declared inside parameter list
2007-11-25 18:42:37 +00:00
Florian Westphal 23e7f7f0dd don't call Resolve_Shutdown() when io_event_create fails 2006-12-17 22:50:51 +00:00
Florian Westphal 939ee6a39b simplify Resolve_Read(). 2006-08-12 11:54:23 +00:00
Alexander Barton dd3a3bc603 Use some more specific data types (e. g. pid_t vs. int), make "SPLint" happy :-) 2006-05-10 21:24:01 +00:00
Florian Westphal 0701afedee removed Resolve_SUCCESS() Macro and Res_Stat->sucess boolean (no longer used/needed) 2006-02-08 15:24:10 +00:00
Florian Westphal a17745d6d7 Make connid same as connection fd. 2006-02-08 15:20:21 +00:00
Florian Westphal 5b2364b236 merge new resolver code 2005-09-12 19:10:20 +00:00
Florian Westphal 4db29b0076 Minimal changes (needed for merging resolver changes) 2005-09-11 11:42:48 +00:00
Florian Westphal fc4cd39202 Wait for DNS reverse lookup (and ident request) before writing results to pipe. 2005-09-03 11:17:16 +00:00
Florian Westphal 6444442931 fix fd leak (happens on failure of fork() ). 2005-09-02 21:47:30 +00:00
Alexander Barton 77f54693ef Removed unnecessary #define of "LOCAL", now use plain C "static" instead. 2005-07-31 20:13:07 +00:00
Florian Westphal 46a191caf6 changed RES_STAT buffer to array 2005-07-28 16:13:09 +00:00
Florian Westphal 2e794a6943 Reverse lookup now checks result by additional forward lookup 2005-07-25 09:20:10 +00:00
Florian Westphal 6ecccd2644 add reverse lookup check 2005-07-24 21:42:00 +00:00
Florian Westphal afef7dee82 cleanup, use new io layer. 2005-07-07 18:39:08 +00:00
Florian Westphal 158bf554c3 minor cleanup 2005-05-28 10:46:50 +00:00
Florian Westphal 8adff59223 Remove INT, LONG, BOOLEAN, STATIC, CONST, CHAR datatypes.
use stdbool.h / inttypes.h if available.
2005-03-19 18:43:48 +00:00
Alexander Barton 5e929effca New function New_Res_Stat() to initialize RES_STAT structure. 2005-03-05 12:57:14 +00:00
Alexander Barton 3012c232eb Fixed resolver when using IDENT lookups, cleaned up code. 2004-05-11 00:01:11 +00:00
Alexander Barton cb76d96efb Fixed some warnings of non-gcc-compilers (e. g. original Apple compiler on
A/UX): "warning: illegal pointer combination, op =".
2004-03-11 22:16:31 +00:00
Alexander Barton b79b315dd4 Added optional support for IDENT lookups (configure switch "--with-ident"). 2003-12-27 13:01:12 +00:00
Alexander Barton c3dfd63bf3 Fixed up some castings. 2003-04-21 10:52:26 +00:00
Alexander Barton 695631b298 - replaced a lot of strcpy() calls with strlcpy() which is more secure. 2002-12-26 17:04:54 +00:00
Alexander Barton 490f28ffd1 - new file header format (in english);
- new file ident semantics.
2002-12-12 12:24:18 +00:00
Alexander Barton 63c36773e4 - Bessere Logging, wenn malloc() fehl schlaegt. 2002-06-09 13:19:08 +00:00
Alexander Barton f7327524fc - Weitere Anpassungen an pre-ANSI-Compiler. 2002-05-30 16:52:20 +00:00
Alexander Barton 46ec0f24f6 - neues Modul "resolve" begonnen. 2002-05-27 11:23:27 +00:00