Commit Graph

54 Commits

Author SHA1 Message Date
joerg f9c2736326 Disable a couple of warnings until further investigation. 2017-01-11 12:19:43 +00:00
roy cc3c06b611 Add support for parsing IPv6 nameservers found in resolv.conf.
Fixes PR bin/42196.
2015-10-15 16:14:40 +00:00
roy f3b5e9756a Revert prior. Instead just send the diagnostic to debugf instead of syslog as it's not really that interesting. 2015-10-15 15:58:34 +00:00
roy 58056b4c20 Derive our primary interface and address by trying to connect to an
address in the TEST-NET-2 network as noted in RFC5737 instead of using
the 1.1.1.1 address. Also, use port 7 (echo) for better style.
Fixes PR bin/46758 thanks to Lloyd Parkes.

While here, if we do fail to connect to the test address, don't spam
this to the console as it's a common case during the boot sequence.
2015-10-15 11:21:53 +00:00
roy 89f3ce7080 If scheduling a probe or response is in the past or exactly now, schedule
it for now + 1 to avoid log file spam about not all probes being sent.
2015-10-15 10:29:57 +00:00
roy 5a3bbc9d90 Revert r1.5 now that the time calculations are using a monotonic clock. 2015-10-15 10:24:33 +00:00
roy 750bc52c86 Starting and stopping should be informational messages to avoid console
spam.
2015-10-15 10:15:18 +00:00
roy fd7491b1b7 A lack of useable addresses on any interfaces is not an error.
More interfaces and/or useable addresses could be added later.
2015-10-12 09:29:25 +00:00
roy 83969876a9 Ignore loopback interfaces 2015-10-12 09:28:15 +00:00
roy afc9672b0b Use clock_gettime as a more accurate time source. 2015-10-12 09:26:38 +00:00
roy ffa75d47bd Teach mdnsd about IN_IFF_NOTREADY and IN_IFF_DETACHED. 2015-06-10 16:32:42 +00:00
christos 98f6460f17 use calloc, remove cast. 2015-01-16 20:16:36 +00:00
prlw1 f44489f8dc MKINET6=no build fixes
http://mail-index.netbsd.org/tech-net/2014/12/13/msg004898.html
2014-12-20 13:15:48 +00:00
jmcneill 6eceb7f535 Change the "mDNSPlatformRawTime went backwards" message from LogMsg to
debugf. It's not that interesting, as it is comparing the results of two
gettimeofday() calls.
2014-11-25 02:29:57 +00:00
pettai 3b429a7601 Import mDNSResponder-320.16, merge, fix conflicts 2014-03-31 23:26:30 +00:00
pettai e28a8d2c02 Import mDNSResponder-320.16, as previous import (258.14) is quite old 2014-03-31 23:21:21 +00:00
christos 0cfae56217 Convert to the new thread safe gethostby{name,addr} nsswitch ABI. 2014-03-31 02:03:38 +00:00
pettai 4754343be0 Fix lost merges 2014-03-28 07:01:49 +00:00
pettai 38e493d085 Import mDNSResponder-258.14, merge, fix conflicts 2014-03-24 00:31:13 +00:00
pettai 7f67feba92 Import mDNSResponder-258-14 as per discussion with gdt@ and cristos@ 2014-03-24 00:23:27 +00:00
pettai e7ba6ce52b Prepare for importing a newer version of mDNSResponder 2014-03-24 00:13:23 +00:00
roy 8085bf2f39 Don't try and use an address we can't use. 2014-01-18 16:51:44 +00:00
roy 2975c235a4 Fix setsockopt(2) error. 2013-11-14 08:26:54 +00:00
taca c6e31784a4 Fix setsockopt(2) error on 64bit environment (amd64).
Reported by PR lib/46693 by me and OK'ed by dholland@.
2012-09-24 14:17:56 +00:00
joerg 90aa08ed31 Don't use array access to compute addresses that are definitely beyond
the static array boundaries.
2011-08-09 12:55:18 +00:00
joerg cbfa018ce3 Add () that match operator order. 2011-06-07 20:04:32 +00:00
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
joerg 89c5df97d0 Fix another format string 2011-05-24 15:44:28 +00:00
joerg 43d31a906a Fix format string 2011-05-24 15:30:31 +00:00
joerg 320b4cf47a Make a gross hack nice enough to not trigger warnings with clang. 2011-05-23 22:39:25 +00:00
wiz 5455c66573 Lots of small fixes, so mdoclint is happy. 2011-02-27 14:01:42 +00:00
plunky 23092b13ed since the mDNSResponder daemon is installed as mdnsd, there is some
confusion in the manpage. Not to mention the examples including
commands that don't exist on NetBSD (killall, sudo), so do a bit of
cleanup (and don't copy from dist, just keep it here)

mDNSResponder -> mdnsd
mdnsd -> mDNSResponder
mDNS -> dns-sd
killall -> pkill
% sudo -> #
syslog(8) -> syslogd(8)
example for syslog -> /dev/null
Xr for pkill, syslogd, dns-sd
2011-02-27 13:05:38 +00:00
plunky a9e881356e the original mDNSResponder.8 manpage, for reference 2011-02-27 13:01:05 +00:00
joerg b8e7b32e9a clang is more restrict matching input and output constraints.
Input is long, but used are only the lower 32bit. The cast actually
saves a byte in the output.
2011-02-17 17:14:56 +00:00
jmcneill 02ad07d4f9 Fix mdnsd "ERROR failed to get errsd via SCM_RIGHTS" problem. mdnsd +
nsswitch.conf "multicast_dns" works for me now on amd64.
2011-02-12 17:21:38 +00:00
joerg fe0427534e Kill use of __DATE__ and __TIME__ in SCCS strings. 2010-12-17 00:23:58 +00:00
mrg 93397973a5 remove an unused reference to LD32DIR. 2009-12-13 08:02:36 +00:00
he 41109a9b3e Only do the nss module if MKPIC != no. 2009-11-28 22:15:48 +00:00
tsarna bfe9f6f3f4 Two new features:
- Detect and adapt to resolv.conf changes through the use of the new
  res_check() API, so that for example changing the search list doesn't
  require restarting clients.

- A persistent mdnsd connection pool, with slow start (so that
  programs like ping, ssh, etc don't keep connections open) and age-out.
  NOTE: Tuning parameter values are just SWAGs.
2009-11-04 23:34:59 +00:00
tsarna 29822c6b8b For the multicast_dns only mode, be very restrictive in what lookups we
try. No point in making queries and waiting for timeouts on lookups that
will never succeed.

Now only does lookups for linklocal addresses (v4 or v6) and
"name.local" names (and dotless names, iff "local" is specified in the
resolv.conf search list).

Also, lower the timeout in this mode, since multicast lookups should
return pretty fast or not at all.
2009-10-26 00:46:19 +00:00
tsarna 6022b5b8d4 Major enhancements to mdnsd nsswitch support:
- nss_mdns renamed to nss_multicast_dns for clarity and less chance of
   confusion with nss_mdnsd (see next).
 - Support using mdnsd for all unicast too with new nss_mdnsd module
   (note: this mode requires an updated mdnsd too, not yet committed)
 - Implement resolv.conf "search" directive support. Needed for nss_mdnsd,
   potentially useful with nss_multicast_dns (you could now do
   "search example.com local" in resolv.conf if you wanted to and it would
   act as you might expect)
 - Add references in nsswitch.conf man page and sample file
 - Implement AI_CANONNAME
 - Various bug fixes
2009-10-25 00:17:06 +00:00
tsarna 76bb45a787 Add interface list dump to debugging output. 2009-10-24 04:04:40 +00:00
tsarna 7fc77dcc85 Add a copy of the Apache 2.0 license here as requested by reed. 2009-10-24 01:59:07 +00:00
tron 2f71c69757 Remove generated file "mdnsd.8" in "cleandir" target. 2009-10-18 17:43:11 +00:00
tron 1ce7a503cf Fix off by one in parser for "/etc/resolv.conf" found by SSP. 2009-10-18 11:54:37 +00:00
tsarna 94ebcd4993 Add nss_mdns, a nsswitch plugin for host lookups vis mDNS ("Bonjour"),
eg "hostname.local".  This is a work in progress, but basically
functional. (note: this requires mdnsd to be running.)
2009-10-05 03:54:17 +00:00
tsarna 3c8b3fccbd Make signals match what OS X and the manpage say. Implement toggles for
debug and packet trace logging.

Make this conditional on HAVE_SIGINFO. Presumably lack of SIGINFO as a
standard posix feature is why they went with different signals here in
the first place, but since we have it, let's use it.
2009-10-03 00:03:05 +00:00
christos 5cf5db250b if __packed exists, use it. I might revert this later when I fully implement
attribute for lint.
2009-10-02 21:05:10 +00:00
tsarna a4329df0cc mdnsd enhancements and fixes:
- Enhance the built-in drop-privs support and use it instead of
  having the rc.conf do it. Avoids log error on startup.
  From OpenSolaris, with enhancements.
- Add dumping of the unicast server list to the DumpStateLog
  debugging output, a'la Mac OS X.
- Fix a locking botch that caused warnings in the log.
- Fix FILE leak. From OpenSolaris.
2009-10-01 16:36:20 +00:00
tron 0b95c5420c Disable stack protection warnings for "uds_daemon.c" which allocates
variable sized buffers on the stack.
2009-10-01 10:01:14 +00:00