netresolve.git
9 years agohttps://github.com/pavlix/netresolve master
Pavel Šimerda [Tue, 19 Jan 2016 18:09:48 +0000 (19:09 +0100)]
https://github.com/pavlix/netresolve

9 years agotools: support `netresolve --listen`
Pavel Šimerda [Tue, 12 Jan 2016 15:11:55 +0000 (16:11 +0100)]
tools: support `netresolve --listen`

9 years agohosts: handle /etc/hosts read errors gracefully
Pavel Šimerda [Mon, 11 Jan 2016 11:56:46 +0000 (12:56 +0100)]
hosts: handle /etc/hosts read errors gracefully

9 years agohosts: support NETRESOLVE_SYSCONFDIR
Pavel Šimerda [Fri, 8 Jan 2016 11:39:41 +0000 (12:39 +0100)]
hosts: support NETRESOLVE_SYSCONFDIR

9 years agocore: use space and vertical bar as backend string separators
Pavel Šimerda [Thu, 19 Nov 2015 12:29:49 +0000 (13:29 +0100)]
core: use space and vertical bar as backend string separators

9 years agonsswitch: change nss-getaddrinfo experimental API
Pavel Šimerda [Thu, 19 Nov 2015 12:29:01 +0000 (13:29 +0100)]
nsswitch: change nss-getaddrinfo experimental API

* Accept an opaque pointer argument to provide context that could
later be used for extended input, non-blocking operation and more.

10 years agonsswitch: support reverse queries
Pavel Šimerda [Thu, 19 Nov 2015 12:26:02 +0000 (13:26 +0100)]
nsswitch: support reverse queries

10 years agonsswitch: refactor buffer handling
Pavel Šimerda [Thu, 19 Nov 2015 12:23:47 +0000 (13:23 +0100)]
nsswitch: refactor buffer handling

10 years agoubdns: don't use by default
Pavel Šimerda [Wed, 18 Nov 2015 14:47:51 +0000 (15:47 +0100)]
ubdns: don't use by default

It looks like libunbound can break some full-screen terminal applications.

Found when running irssi with nss-netresolve.

10 years agoaresdns: don't abort in callback when cleaning up
Pavel Šimerda [Wed, 18 Nov 2015 12:05:53 +0000 (13:05 +0100)]
aresdns: don't abort in callback when cleaning up

Found when running Firefox with nss-netresolve.

10 years agoservices: use reentrant strtok_r()
Pavel Šimerda [Wed, 18 Nov 2015 11:33:56 +0000 (12:33 +0100)]
services: use reentrant strtok_r()

Found when running Firefox with nss-netresolve.

10 years agoepoll: handle EINTR gracefully
Pavel Šimerda [Wed, 18 Nov 2015 10:29:08 +0000 (11:29 +0100)]
epoll: handle EINTR gracefully

Found when running Firefox with nss-netresolve.

10 years agoavahi: fail when not delivering results
Pavel Šimerda [Wed, 18 Nov 2015 10:01:41 +0000 (11:01 +0100)]
avahi: fail when not delivering results

* This is important to give change to classic DNS.
* At the same time this change fixes tests that were broken by accident.

10 years agologging: always show correct address
Pavel Šimerda [Mon, 16 Nov 2015 15:01:13 +0000 (16:01 +0100)]
logging: always show correct address

10 years agohostname: include link-local addresses
Pavel Šimerda [Mon, 16 Nov 2015 15:00:44 +0000 (16:00 +0100)]
hostname: include link-local addresses

10 years agoavahi: fix rr structure creation
Pavel Šimerda [Mon, 16 Nov 2015 13:30:44 +0000 (14:30 +0100)]
avahi: fix rr structure creation

10 years agohostname: avoid segfault in hostname backend
Pavel Šimerda [Tue, 10 Nov 2015 20:25:17 +0000 (21:25 +0100)]
hostname: avoid segfault in hostname backend

10 years agonsswitch: link nss module to libnetresolve
Pavel Šimerda [Tue, 10 Nov 2015 17:24:57 +0000 (18:24 +0100)]
nsswitch: link nss module to libnetresolve

Otherwise it would complain at runtime.

10 years agomerge libnetresolve-backend back into libnetresolve
Pavel Šimerda [Mon, 9 Nov 2015 09:18:01 +0000 (10:18 +0100)]
merge libnetresolve-backend back into libnetresolve

The split didn't provide the expected results. All backends are now
linked to libnetresolve which can later be used to enhance them to
work in other context than as netresolve backends, e.g. as glibc
backends.

10 years agofix dns-srv canonical name
Pavel Šimerda [Fri, 6 Nov 2015 15:58:06 +0000 (16:58 +0100)]
fix dns-srv canonical name

10 years agofix up copyright notices
Pavel Šimerda [Mon, 19 Oct 2015 09:03:54 +0000 (11:03 +0200)]
fix up copyright notices

10 years agoadd separate libnetresolve-backend
Pavel Šimerda [Thu, 5 Nov 2015 13:45:11 +0000 (14:45 +0100)]
add separate libnetresolve-backend

10 years agoavahi: merge into dns.c and improve
Pavel Šimerda [Thu, 15 Oct 2015 08:30:22 +0000 (10:30 +0200)]
avahi: merge into dns.c and improve

 * Support for multiple addresses
 * Support for reverse queries

10 years agoubdns: add 'server=<ip-address>' option
Pavel Šimerda [Tue, 13 Oct 2015 20:13:28 +0000 (22:13 +0200)]
ubdns: add 'server=<ip-address>' option

10 years agotests: ignore localhost[46] from gethostbyaddr
Pavel Šimerda [Wed, 30 Sep 2015 14:08:30 +0000 (16:08 +0200)]
tests: ignore localhost[46] from gethostbyaddr

Some distributions add 'localhost4' and 'localhost6 aliases to localhost
IPv4 and IPv6 addresses.

10 years agotests: allow to easily run shell tests with valgrind or other tool
Pavel Šimerda [Thu, 17 Sep 2015 18:45:46 +0000 (20:45 +0200)]
tests: allow to easily run shell tests with valgrind or other tool

10 years agotests: handle different system configurations
Pavel Šimerda [Tue, 15 Sep 2015 23:18:15 +0000 (01:18 +0200)]
tests: handle different system configurations

10 years agobuild: fix optional dependency handling
Pavel Šimerda [Tue, 15 Sep 2015 12:29:36 +0000 (14:29 +0200)]
build: fix optional dependency handling

10 years agobuild: implement NOCONFIGURE in autogen.sh
Pavel Šimerda [Tue, 15 Sep 2015 12:29:58 +0000 (14:29 +0200)]
build: implement NOCONFIGURE in autogen.sh

10 years agoasyncns: get rid of undefined symbols
Pavel Šimerda [Wed, 16 Sep 2015 00:01:07 +0000 (02:01 +0200)]
asyncns: get rid of undefined symbols

10 years agonss: avoid leaking allocate memory
Pavel Šimerda [Thu, 17 Sep 2015 20:34:19 +0000 (22:34 +0200)]
nss: avoid leaking allocate memory

10 years agoubdns: avoid leaking allocated memory
Pavel Šimerda [Wed, 16 Sep 2015 19:26:58 +0000 (21:26 +0200)]
ubdns: avoid leaking allocated memory

10 years agocore: avoid leaking allocated memory
Pavel Šimerda [Wed, 16 Sep 2015 20:56:04 +0000 (22:56 +0200)]
core: avoid leaking allocated memory

10 years agobuild: make ldns optional
Pavel Šimerda [Tue, 15 Sep 2015 11:11:46 +0000 (13:11 +0200)]
build: make ldns optional

10 years agobuild: fix backend conditionals
Pavel Šimerda [Tue, 15 Sep 2015 09:34:05 +0000 (11:34 +0200)]
build: fix backend conditionals

10 years agotools: display a useful quick help
Pavel Šimerda [Mon, 14 Sep 2015 21:54:51 +0000 (23:54 +0200)]
tools: display a useful quick help

10 years agotrivial: rename `free_user_data` to `cleanup`
Pavel Šimerda [Tue, 8 Sep 2015 14:58:32 +0000 (16:58 +0200)]
trivial: rename `free_user_data` to `cleanup`

10 years agoevent: allow zero timeouts
Pavel Šimerda [Tue, 8 Sep 2015 14:50:15 +0000 (16:50 +0200)]
event: allow zero timeouts

10 years agoquery: don't return boolean from dispatch-style functions
Pavel Šimerda [Tue, 8 Sep 2015 14:15:55 +0000 (16:15 +0200)]
query: don't return boolean from dispatch-style functions

10 years agoquery: refactor event handling and simplify backend API
Pavel Šimerda [Thu, 3 Sep 2015 09:05:43 +0000 (11:05 +0200)]
query: refactor event handling and simplify backend API

 * Event API is now callback based
 * Backend API is simplified to a single function per query mode

These changes lead to much more readable query and backend code
and reduces backend entry points to actual name resolution functions,
i.e. `query_forward()`, `query_reverse()` and `query_dns()`.

10 years agosocket: fixup unintentional priority timeout change
Pavel Šimerda [Tue, 25 Aug 2015 13:50:08 +0000 (15:50 +0200)]
socket: fixup unintentional priority timeout change

10 years agosocket: refactor socket code
Pavel Šimerda [Mon, 27 Jul 2015 17:02:09 +0000 (19:02 +0200)]
socket: refactor socket code

Add support for connecting to the next available socket.

10 years agotools: support `--ping` option
Pavel Šimerda [Fri, 3 Jul 2015 21:35:31 +0000 (23:35 +0200)]
tools: support `--ping` option

10 years agobackends: add avahi support
Pavel Šimerda [Wed, 19 Aug 2015 12:46:41 +0000 (14:46 +0200)]
backends: add avahi support

10 years agoquery: refactor event handling
Pavel Šimerda [Wed, 19 Aug 2015 12:42:12 +0000 (14:42 +0200)]
query: refactor event handling

10 years agocompat: harmonize getaddrinfo null serviname with glibc
Pavel Šimerda [Mon, 13 Jul 2015 16:15:03 +0000 (18:15 +0200)]
compat: harmonize getaddrinfo null serviname with glibc

10 years agobuild: improve dependency handling
Pavel Šimerda [Wed, 19 Aug 2015 12:35:31 +0000 (14:35 +0200)]
build: improve dependency handling

10 years agolarger scale refactoring
Pavel Šimerda [Tue, 20 Jan 2015 17:26:20 +0000 (18:26 +0100)]
larger scale refactoring

10 years agodon't abort on bad poll events
Pavel Šimerda [Wed, 28 Jan 2015 11:27:00 +0000 (12:27 +0100)]
don't abort on bad poll events

10 years agofix up rrcode after libunbound for empty answer
Pavel Šimerda [Wed, 28 Jan 2015 11:18:06 +0000 (12:18 +0100)]
fix up rrcode after libunbound for empty answer

This libunbound issue broke the following test:

    ./netresolve --node 1:2:3:4:5:6:7:8%999999x

It returned different results on different runs because libunbound
sometimes returned rcode=0 rr_count=0.

10 years agoupdate README
Pavel Šimerda [Thu, 15 Jan 2015 16:49:41 +0000 (17:49 +0100)]
update README

10 years agorefactor nonblocking API
Pavel Šimerda [Thu, 15 Jan 2015 16:47:29 +0000 (17:47 +0100)]
refactor nonblocking API

10 years agocore: rename channel to context
Pavel Šimerda [Mon, 12 Jan 2015 15:34:17 +0000 (16:34 +0100)]
core: rename channel to context

It is done to reflect the remarkable change in netresolve architecture
where most active code has been moved from the channel to the query, so
that now the former channel is nothing more than a minimal context
object that holds configuration, callbacks and very minimal runtime
data.

10 years agocli: set log level to *error* by default
Pavel Šimerda [Sun, 28 Dec 2014 22:17:22 +0000 (23:17 +0100)]
cli: set log level to *error* by default

10 years agowrapresolve: support --backends option
Pavel Šimerda [Sun, 28 Dec 2014 22:17:13 +0000 (23:17 +0100)]
wrapresolve: support --backends option

10 years agouse ldns to print DNS data
Pavel Šimerda [Sun, 28 Dec 2014 22:14:48 +0000 (23:14 +0100)]
use ldns to print DNS data

10 years agochannel: initialize epoll.fd to -1
Pavel Šimerda [Wed, 24 Dec 2014 12:52:45 +0000 (13:52 +0100)]
channel: initialize epoll.fd to -1

10 years agofix tests for renamed getaddrinfo backend
Pavel Šimerda [Wed, 24 Dec 2014 12:49:08 +0000 (13:49 +0100)]
fix tests for renamed getaddrinfo backend

10 years agocompat: fix libc getnameinfo
Pavel Šimerda [Wed, 24 Dec 2014 12:12:31 +0000 (13:12 +0100)]
compat: fix libc getnameinfo

10 years agohosts: fix ifindex support
Pavel Šimerda [Wed, 24 Dec 2014 09:59:49 +0000 (10:59 +0100)]
hosts: fix ifindex support

11 years agotools: print DNS data in netresolve
Pavel Šimerda [Sun, 16 Nov 2014 17:27:19 +0000 (18:27 +0100)]
tools: print DNS data in netresolve

11 years agocore: use abort() for fatal conditions in netresolve_query_new()
Pavel Šimerda [Sun, 16 Nov 2014 17:26:40 +0000 (18:26 +0100)]
core: use abort() for fatal conditions in netresolve_query_new()

11 years agolibc: rename getaddrinfo backend to libc, add support for getnameinfo and res_query
Pavel Šimerda [Sun, 16 Nov 2014 15:21:07 +0000 (16:21 +0100)]
libc: rename getaddrinfo backend to libc, add support for getnameinfo and res_query

11 years agocore: improve backend API
Pavel Šimerda [Sun, 16 Nov 2014 15:25:41 +0000 (16:25 +0100)]
core: improve backend API

11 years agocore: fix netresolve_query_get_dns_answer()
Pavel Šimerda [Sat, 15 Nov 2014 21:15:06 +0000 (22:15 +0100)]
core: fix netresolve_query_get_dns_answer()

11 years agoupdate .gitignore
Pavel Šimerda [Thu, 13 Nov 2014 13:00:15 +0000 (14:00 +0100)]
update .gitignore

11 years agocore: use a linked list for queries
Pavel Šimerda [Thu, 13 Nov 2014 12:09:39 +0000 (13:09 +0100)]
core: use a linked list for queries

11 years agocore: move event handling to the query object
Pavel Šimerda [Thu, 13 Nov 2014 11:13:21 +0000 (12:13 +0100)]
core: move event handling to the query object

11 years agocore: support `netresolve_epoll_fd()` after `netresolve_open()`
Pavel Šimerda [Wed, 12 Nov 2014 23:21:27 +0000 (00:21 +0100)]
core: support `netresolve_epoll_fd()` after `netresolve_open()`

11 years agocore: reuse netresolve-epoll for blocking mode
Pavel Šimerda [Wed, 12 Nov 2014 14:22:00 +0000 (15:22 +0100)]
core: reuse netresolve-epoll for blocking mode

11 years agocore: improve event loop integration
Pavel Šimerda [Wed, 12 Nov 2014 11:28:21 +0000 (12:28 +0100)]
core: improve event loop integration

11 years agocore: decrement channel->nqueries unconditionally
Pavel Šimerda [Wed, 12 Nov 2014 22:35:20 +0000 (23:35 +0100)]
core: decrement channel->nqueries unconditionally

11 years agocore: minor cleanups
Pavel Šimerda [Thu, 13 Nov 2014 09:53:10 +0000 (10:53 +0100)]
core: minor cleanups

11 years agocore: move callback from channel to query
Pavel Šimerda [Tue, 11 Nov 2014 17:59:49 +0000 (18:59 +0100)]
core: move callback from channel to query

11 years agoubdns: support dnssec validation
Pavel Šimerda [Tue, 11 Nov 2014 15:10:17 +0000 (16:10 +0100)]
ubdns: support dnssec validation

11 years agodns: support dnssec AD flag
Pavel Šimerda [Tue, 11 Nov 2014 15:02:10 +0000 (16:02 +0100)]
dns: support dnssec AD flag

Note: The ./tests/test-dnssec.sh will fail for ubdns because of a
limitation in libunbound.

11 years agobackends: support result security
Pavel Šimerda [Tue, 11 Nov 2014 13:29:42 +0000 (14:29 +0100)]
backends: support result security

11 years agoservices: return NULL servname for zero port
Pavel Šimerda [Tue, 11 Nov 2014 14:57:45 +0000 (15:57 +0100)]
services: return NULL servname for zero port

11 years agocore: implement per-backend timeouts and partial result timeouts
Pavel Šimerda [Fri, 7 Nov 2014 16:19:50 +0000 (17:19 +0100)]
core: implement per-backend timeouts and partial result timeouts

11 years agodns: refactor thoroughly, add tests
Pavel Šimerda [Mon, 10 Nov 2014 21:09:33 +0000 (22:09 +0100)]
dns: refactor thoroughly, add tests

Tests aren't being run as part of 'make check' as they rely on
working DNS configuration.

11 years agocore: support NETRESOLVE_CLAMP_TTL
Pavel Šimerda [Tue, 11 Nov 2014 12:05:48 +0000 (13:05 +0100)]
core: support NETRESOLVE_CLAMP_TTL

11 years agocore: default srv lookups to TCP
Pavel Šimerda [Tue, 11 Nov 2014 12:06:14 +0000 (13:06 +0100)]
core: default srv lookups to TCP

11 years agobackends: add `netresolve_backend_unwatch_fd()`
Pavel Šimerda [Tue, 11 Nov 2014 09:42:18 +0000 (10:42 +0100)]
backends: add `netresolve_backend_unwatch_fd()`

11 years agotrivial: remove unused test data
Pavel Šimerda [Mon, 10 Nov 2014 15:38:29 +0000 (16:38 +0100)]
trivial: remove unused test data

11 years agohostname: handle NULL nodename
Pavel Šimerda [Mon, 10 Nov 2014 14:59:12 +0000 (15:59 +0100)]
hostname: handle NULL nodename

11 years agodns: fix whitespace
Pavel Šimerda [Mon, 10 Nov 2014 14:34:22 +0000 (15:34 +0100)]
dns: fix whitespace

11 years agotools: fix getnameinfo port input
Pavel Šimerda [Sun, 9 Nov 2014 21:45:55 +0000 (22:45 +0100)]
tools: fix getnameinfo port input

11 years agotools: suport getnameinfo --udp (NI_DGRAM flag)
Pavel Šimerda [Sun, 9 Nov 2014 00:39:40 +0000 (01:39 +0100)]
tools: suport getnameinfo --udp (NI_DGRAM flag)

And make appropriate changes so that it warks in the netresolve
libc frontend.

11 years agotools: show port in getnameinfo query
Pavel Šimerda [Sun, 9 Nov 2014 00:34:21 +0000 (01:34 +0100)]
tools: show port in getnameinfo query

11 years agoaresdns: fix file descriptor handling
Pavel Šimerda [Sat, 8 Nov 2014 18:24:18 +0000 (19:24 +0100)]
aresdns: fix file descriptor handling

11 years agodns: consolidate lookup functions
Pavel Šimerda [Sat, 8 Nov 2014 23:53:27 +0000 (00:53 +0100)]
dns: consolidate lookup functions

11 years agodns: set cannonical name
Pavel Šimerda [Sat, 8 Nov 2014 23:57:21 +0000 (00:57 +0100)]
dns: set cannonical name

11 years agodns: support IPv6 reverse queries
Pavel Šimerda [Sat, 8 Nov 2014 23:22:07 +0000 (00:22 +0100)]
dns: support IPv6 reverse queries

11 years agodns: improve debug messages
Pavel Šimerda [Sat, 8 Nov 2014 23:16:28 +0000 (00:16 +0100)]
dns: improve debug messages

11 years agocore: handle empty node name correctly
Pavel Šimerda [Sun, 9 Nov 2014 00:00:11 +0000 (01:00 +0100)]
core: handle empty node name correctly

11 years agocore: abort on failed epoll_ctl
Pavel Šimerda [Sat, 8 Nov 2014 18:23:24 +0000 (19:23 +0100)]
core: abort on failed epoll_ctl

11 years agodns: remove dead code
Pavel Šimerda [Sat, 8 Nov 2014 23:14:50 +0000 (00:14 +0100)]
dns: remove dead code

11 years agotrivial: remove dead code.
Pavel Šimerda [Fri, 7 Nov 2014 22:21:31 +0000 (23:21 +0100)]
trivial: remove dead code.

11 years agodns: merge ubdns and aresdns backens
Pavel Šimerda [Thu, 6 Nov 2014 16:06:30 +0000 (17:06 +0100)]
dns: merge ubdns and aresdns backens

The new implementation uses ldns for all the parsing and either ubdns or
aresdns depending on preprocessor arguments. The resulting
`libnetresolve_backend_ubdns()` and `libnetresolve_backend_aresdns()`
are thus very similar in functionality, only nuances of the DNS protocol
handling and DNSSEC validation differ.

11 years agobackends: delay `cleanup()` until `setup()` or `dispatch()` finishes
Pavel Šimerda [Fri, 7 Nov 2014 20:06:41 +0000 (21:06 +0100)]
backends: delay `cleanup()` until `setup()` or `dispatch()` finishes

This change effectively removes an unwritten requirement for reentrancy
of the backend, i.e. the requirement to call netresolve backend API
functions always at the and as they could do just anything.

The backend can now safely assume that none of its functions will be
triggered by the backend API functions. In other words, calls to
functions of a single backend are serialized.

This page took 0.084374 seconds and 5 git commands to generate.