Commit Graph

83 Commits

Author SHA1 Message Date
christos 7521fc28e7 Don't hard-code the path 2018-12-09 19:03:42 +00:00
christos 0f33703f35 It is not an error if we did not find any IPv4 interfaces. It could
be the case we never have V4 interfaces (in a V6 system) so this
is bogus. The code was recently changed to ignore loopback interfaces.
If mdnsd was started too early, this means that no interfaces would
be found (since interfaces down, with no addresses, or tentative
are ignored). I put back the loopback interfaces yesterday to avoid
this error, but this seems like the left hand not knowing what the
right hand does because whoever removed the loopback interfaces
from the list, did not read the 'self discovery' comment and the
special code that deals with loopback in this file. Nevertheless,
I think it is better to ignore the loopback interfaces in the long
run, but it is ok to keep them around since the code is handling
them just fine (and works both with and without them).
2018-11-19 08:14:28 +00:00
christos 96efac35b4 Use our getifaddrs version 2018-11-18 18:58:44 +00:00
christos 73617236ff print the path of the unix socket we could not create. 2018-11-18 18:58:05 +00:00
christos 50d2c4317f NFC: Fix commit message: Include the loopback so that we don't return an
empty address list before addresses are configured.
2018-11-18 18:57:12 +00:00
christos 29fb438a54 Add a simpler version to do interface enumeration that uses getifaddrs(3) 2018-11-18 18:55:49 +00:00
christos f1096f3c6c initialize addr to 0. 2018-05-02 12:12:13 +00:00
christos 0c6b6224b4 Add the missing lock. 2018-04-11 18:34:18 +00:00
christos d0c4b2c3b3 Add the location of the last lock to help debugging. 2018-04-11 18:33:48 +00:00
christos 03fd2bea72 instead of short-circuiting the test, set auto target host on by default. 2018-04-11 18:33:21 +00:00
christos 4fd06914cd remove format checker; cannot work because of %#a (ip address printing). 2018-04-08 13:43:29 +00:00
christos 067ca08c91 show how to turn on debugging. 2018-04-07 19:18:44 +00:00
christos 70d8d7a03a put back handling for SIOCGIFAFLAG_IN -- should not matter. 2018-04-07 19:18:16 +00:00
christos ebd0d44a84 When we advertise interfaces, don't skip if we are not autotargetting services
yet. It is the chicken and the egg problem.
2018-04-07 19:13:27 +00:00
christos 85ffe40e13 Allow overriding checking for debug functions 2018-04-07 19:09:12 +00:00
christos ce06c661cc Fix Reproducible builds by obeying MDNS_VERSIONSTR_NODTS in all cases.
Reported by wiz@
2018-03-03 16:09:56 +00:00
christos 4824f3b241 update upstream code changes in signal handling. 2018-02-25 21:06:40 +00:00
christos e68081c947 merge conflicts; also:
- Do the reuse-port first like MacOS/X otherwise we can't bind
- Disable SO_RECV_ANYIF hack
2018-02-25 20:04:55 +00:00
christos 200e8a27b2 import latest 2018-02-25 19:25:33 +00:00
christos 58300083f7 zero out socket structures before bind. 2018-02-25 19:22:41 +00:00
christos e7011cce36 optval is int not long 2018-02-04 20:38:41 +00:00
christos 177e5524a5 make lint compile again. 2018-01-17 06:10:27 +00:00
christos 19e9df2ac8 remove Documents before import. 2018-01-14 22:51:12 +00:00
christos 5d4f18293e Add -I 2018-01-14 20:16:04 +00:00
christos 8307bba0ea resolve conflicts 2018-01-14 20:04:55 +00:00
christos 18d6f1d293 import latest version 2018-01-14 19:40:50 +00:00
christos a7f8f91557 merge conflicts 2018-01-14 19:37:35 +00:00
christos 1ea71b3ac3 import latest mDNSResponder 2018-01-14 18:43:01 +00:00
joerg c974d38c4e Fix format strings to reflect exactly the types used. 2017-07-21 08:49:05 +00:00
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