LouisBrunner / avahi2dns

Small DNS server which interface with avahi (perfect for Alpine Linux and musl)
MIT License
22 stars 4 forks source link

name does not resolve, but receives reqest and forwards to avahi #4

Open mattwood-microchip opened 11 months ago

mattwood-microchip commented 11 months ago

Hi,

I have an embedded target (musl) that I need to mdns resolution. I built avahi2mdns and deployed it successfully. I added a nameserver 127.0.0.1 entry to resolve.conf but when I attempt to ping a .local address from the embedded target ping fails. Interestingly, avahi2dns seems to do its job correctly however. Any idea what could be causing this? Log below.

Thanks!

avahi2dns -v DEBU[0000]github.com/LouisBrunner/avahi2dns/config.go:32 main.parseArgs() config parsed config="&{[home internal intr anet lan local private test] localhost 53 true}" DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:14 main.runServer() connection to dbus...
DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:21 main.runServer() connection to avahi through dbus...
DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:37 main.runServer() adding dns handler domain=home DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:37 main.runServer() adding dns handler domain=internal DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:37 main.runServer() adding dns handler domain=intranet DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:37 main.runServer() adding dns handler domain=lan DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:37 main.runServer() adding dns handler domain=local DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:37 main.runServer() adding dns handler domain=private DEBU[0000]github.com/LouisBrunner/avahi2dns/server.go:37 main.runServer() adding dns handler domain=test INFO[0000]github.com/LouisBrunner/avahi2dns/server.go:46 main.runServer() starting DNS server addr="localhost:53" DEBU[0002]github.com/LouisBrunner/avahi2dns/server.go:30 main.runServer.func1() received request component=main request=";; opcode: QUERY, status: NOERROR, id: 5070\n;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0\n\n;; QUESTION SECTION:\n;hostname.local.\tIN\t A\n" INFO[0002]github.com/LouisBrunner/avahi2dns/query.go:52 main.avahiToRecord() forwarding query to avahi component=main name=hostname.local. protocol=0 type=A DEBU[0002]github.com/LouisBrunner/avahi2dns/server.go:30 main.runServer.func1() received request component=main request=";; opcode: QUERY, status: NOERROR, id: 10670\n;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0\n\n;; QUESTION SECTION:\n;hostname.local.\tIN\t AAAA\n" INFO[0002]github.com/LouisBrunner/avahi2dns/query.go:52 main.avahiToRecord() forwarding query to avahi component=main name=hostname.local. protocol=1 type=AAAA DEBU[0002]github.com/LouisBrunner/avahi2dns/server.go:32 main.runServer.func1() sending reply component=main reply=";; opcode: QUERY, status: NOERROR, id: 0\n;; flags:; QUERY: 0, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0\n\n;; ANSWER SECTION:\nhostname.local.\t3600\tIN\tA\t192.168.1.188\n" DEBU[0002]github.com/LouisBrunner/avahi2dns/server.go:32 main.runServer.func1() sending reply component=main reply=";; opcode: QUERY, status: NOERROR, id: 0\n;; flags:; QUERY: 0, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0\n\n;; ANSWER SECTION:\nhostname.local.\t3600\tIN\tAAAA\tfe80::28b4:32ff:fe0f:38d0\n"

LouisBrunner commented 11 months ago

Hi @mattwood-microchip,

Weird, everything seems to be working...

What's the output of dig in that scenario?