Commit Graph

61 Commits

Author SHA1 Message Date
Asim
e683f11ef9 There's now no owner... it is owned by the world 2016-04-30 00:08:24 +01:00
Asim
7f3f4b65ae Remove noise https://github.com/hashicorp/mdns/pull/34 2016-04-29 23:55:12 +01:00
Asim
3590a367d8 Add examples https://github.com/hashicorp/mdns/pull/42 2016-04-29 23:53:34 +01:00
Asim
feb0629af0 Add https://github.com/hashicorp/mdns/pull/36 RFC-6762-compliant DNS-SD 2016-04-29 23:48:11 +01:00
Asim
28e58969dc use official golang/net https://github.com/hashicorp/mdns/pull/45 2016-04-29 23:37:04 +01:00
Asim
b8712a0af4 Add https://github.com/hashicorp/mdns/pull/50 2016-04-29 23:34:13 +01:00
Ryan Uber
9d85cf22f9 Merge pull request #48 from stapelberg/master
Expose rr.Txt as []string instead of joining it with “|”.
2015-12-05 20:24:12 -08:00
Michael Stapelberg
83d7e99a21 Expose rr.Txt as []string instead of joining it with “|”.
Joining the different fields into a single string is problematic when
the fields contain the separator character “|” themselves.

As an example, I’ve named my chromecast “Hendrix|test”, and this happens
when I print a ServiceEntry:

ServiceEntry: &{Name:Hendrix|test._googlecast._tcp.local. Host:Hendrix|test.local. AddrV4:10.0.0.184 AddrV6:<nil> Port:8009 Info:id=3fc948dbfebcf5d7ec77d7b043dce81e|ve=04|md=Chromecast Audio|ic=/setup/icon.png|fn=Hendrix|test|ca=4|st=0|bs=FA8FCA928304|rs= Addr:10.0.0.184 hasTXT:true sent:true}

When using strings.Split, I would not correctly parse the fn= field.

With the new InfoFields member, this problem can be avoided entirely.
2015-11-27 17:21:23 +01:00
Armon Dadgar
2b439d3701 Merge pull request #31 from yinghau76/master
Consider additional section when merging RR for a service entry
2015-03-17 10:42:56 -07:00
Patrick Tsai
e4fb98e255 Consider additional section when merging RR for a service entry 2015-03-16 01:38:10 -07:00
Armon Dadgar
e23dbc9d18 Merge pull request #30 from azlyth/master
Fix double period at end of formatted hostname
2015-03-09 09:57:00 -07:00
Peter Valdez
8c52853f0a Fix double period at end of tmpHostname. 2015-03-08 21:53:16 -04:00
Armon Dadgar
eb98accb64 Revert "Send response to multicast address if requested"
This reverts commit c6d75aa8ab.

Conflicts:
	server.go
2015-02-12 18:22:57 -08:00
Armon Dadgar
e4aba3430c Update README 2014-11-24 11:28:51 -08:00
Armon Dadgar
c01b6b75d5 Merge pull request #26 from brutella/service-enum
Respond to _services._dns-sd._udp.<domain> dns query
2014-11-07 14:35:48 -08:00
Matthias Hochgatterer
603e32d4fa Add unit test 2014-11-07 13:44:29 +01:00
Matthias Hochgatterer
d456efdb2f Respond to _services._dns-sd._udp.<domain> dns question 2014-11-07 13:28:08 +01:00
Armon Dadgar
a57b761c4d Style cleanup 2014-11-06 16:38:13 -08:00
Armon Dadgar
a26b69e7bc Merge pull request #24 from brutella/multicast-response
Send response to multicast address if requested
2014-11-06 16:31:26 -08:00
Matthias Hochgatterer
c6d75aa8ab Send response to multicast address if requested 2014-11-05 12:32:13 +01:00
Armon Dadgar
f4e9d517ac Fixing tests 2014-11-03 12:55:52 -08:00
Armon Dadgar
317513147d Merge pull request #21 from gonzojive/handle-query
Make mDNS server response more compatible with RFC 6762 spec.
2014-11-03 12:53:43 -08:00
Armon Dadgar
40f4a787fc Merge pull request #18 from gonzojive/hostname-questions
Make MDNSService respond to questions for A/AAAA records about its hostname.
2014-11-03 12:08:13 -08:00
Armon Dadgar
827e8b390b Merge pull request #17 from gonzojive/refactor-zone
Refactor mdns.MDNSService API in zone.go.
2014-11-03 12:07:28 -08:00
Armon Dadgar
b720948f88 Merge pull request #23 from ryanuber/fork-net
Switch to fork of go.net
2014-11-03 11:42:22 -08:00
Ryan Uber
d83f28beed Switch to fork of go.net 2014-11-03 11:36:47 -08:00
Armon Dadgar
075c214825 Merge pull request #19 from gonzojive/default-ttl
Update defaultTTL to 120 seconds.
2014-10-20 10:56:37 -07:00
Red Daly
1ec3c33419 Merge branch 'master' of github.com:armon/mdns into refactor-zone 2014-10-17 15:50:33 -07:00
Red Daly
68622dea49 Make mDNS server response more compatible with RFC 6762 spec.
- dns.Msg construction is now explicit, with comments pointing to the RFC about
  the values of each field.
- dns.Msg responses no longer contain a Question section, which is not allowed
  according to the spec.
- handleQuestion's interface returns both unicast and multicast answer records.
  (Note: These are not yet treated differently by the sendResponse method.)
- removed unused error return value of handleQuestion
2014-10-17 15:42:54 -07:00
Red Daly
4585af0093 Update defaultTTL to 120 seconds. 2014-10-17 13:54:08 -07:00
Red Daly
5699c717d1 Make MDNSService respond to questions for A/AAAA records about its hostname. 2014-10-16 14:34:25 -07:00
Red Daly
68fbdf7e65 Fix compilation problem with zone_test.go (s/test.Domain/test.domain/). 2014-10-16 14:01:13 -07:00
Armon Dadgar
6c44326b32 Merge pull request #15 from gonzojive/refactor-client
Refactor client.go.
2014-10-16 10:39:12 -07:00
Red Daly
e39d11792c Refactor mdns.MDNSService API in zone.go.
- Change API for constructing an MDNSService: use NewMDNSService func instead of
  creating an MDNSService struct and calling its Init method.
- Allow full specification of the host name and IP addresses of an MDNSService
  instead of relying on the net package to infer them from the OS.
- Remove deprecated Addr member of MDNSService.
- Modify tests to comply with new API.
2014-10-16 10:38:12 -07:00
Red Daly
6f752e8251 Refactor client.go.
- Add WantUnicastResponse to allow sending mDNS queries that desire unicast
  responses (see section 5.4 in RFC6762).
- Listen for UDP packets sent to the mDNS multicast addresses ("ipv4:
  224.0.0.251", ipv6: "ff02::fb")
- Fix bug on line 177 of client.go: Ignored error during sendQuery.
- Add TODO comments regarding unimplemented features of mDNS protocol.
- Add error logging statement when DNS packet parsing failed.
2014-10-15 14:49:00 -07:00
Armon Dadgar
f5542c2469 Merge pull request #12 from richtr/improved_dns_srv_formatting
Pull request for issue #4
2014-09-13 15:38:04 -07:00
Armon Dadgar
3e798410dc Merge pull request #11 from richtr/no_ipbind_warning_on_success
Add IP binding suppression if at least one UDP listener is registered
2014-09-13 15:35:21 -07:00
Armon Dadgar
c4aa495dc0 Merge pull request #10 from richtr/no_recursive_dns
Suppress recursive mDNS queries and query for PTR records only
2014-09-13 15:34:53 -07:00
Armon Dadgar
66d411ff65 Merge pull request #9 from richtr/handle_multiple_mdns_questions
Handle multiple mDNS questions as allowed in RFC6762
2014-09-13 15:34:14 -07:00
richtr
28988a0358 General bug fixes to pass tests 2014-09-11 14:32:24 +02:00
richtr
0ae91b08c8 Update example in README 2014-09-11 14:18:46 +02:00
richtr
2f2002e875 Update tests to incorporate the latest library changes 2014-09-11 14:18:27 +02:00
richtr
a8a4397315 General updates to DNS SRV handling and decreased reliance on IP addressing (use FQDNs where we can) 2014-09-11 14:16:20 +02:00
richtr
095233e3dc Add IP binding suppression if at least one listener is registered 2014-09-11 13:31:19 +02:00
richtr
256fad4daf Suppress recursive mDNS queries and query for PTR records only 2014-09-11 13:29:21 +02:00
richtr
4719107d49 Handle multiple mDNS questions as allowed in RFC6762 2014-09-11 13:26:27 +02:00
Armon Dadgar
decec489d7 Fixing issue with query flooding 2014-07-10 10:58:39 -07:00
Armon Dadgar
70462deb06 Increase default TTL to 10 seconds. Fixes #3. 2014-05-23 10:34:25 -07:00
Armon Dadgar
847afc6720 Re-write the name of the service for correct lookups 2014-05-22 10:51:59 -07:00
Armon Dadgar
4cb233f48b Fixing aliasing issues 2014-05-20 11:38:15 -07:00