mirage / ocaml-dns

OCaml implementation of the DNS protocol
BSD 2-Clause "Simplified" License
106 stars 43 forks source link

issues parsing sample zone file #67

Closed heidihoward closed 9 years ago

heidihoward commented 9 years ago

ocaml-dns cannot parse the zone file that we typically use as an example, see https://github.com/mirage/mirage-skeleton/blob/master/dns/data/test.zone

$ sudo ./mir-dns
plugging into tap0 with mac c2:9d:56:19:d7:2c..
Netif: connect tap0
Manager: connect
Manager: connect
Manager: configuring
Manager: Interface to 192.168.1.2 nm 255.255.255.0 gw [192.168.1.1]

ARP: sending gratuitous from 192.168.1.2
Manager: configuration done
Manager: configuring
Warning (<string> line 47): Converting MD to MX
Warning (<string> line 48): Converting MF to MX
Error (<string> line 54): udp is not a known IP protocol
Error (<string> line 56): unknown service "chargen" for protocol 6
Manager: socket config currently ignored (TODO)
Warning (<string> line 47): Converting MD to MX
Warning (<string> line 48): Converting MF to MX
Error (<string> line 54): udp is not a known IP protocol
Error (<string> line 56): unknown service "chargen" for protocol 6

[thanks to Nick Betteridge on mirageos-dev for spotting this]

lcdunstan commented 9 years ago

The code comments say "temporarily fail until we have getservbyname" and "getprotobyname not implemented yet", which is fair enough. Implementing those for MirageOS seems like it should be a low priority, so the example zone file should be fixed for now. What do you think?

dsheets commented 9 years ago

mirage/ocaml-uri#74 is now tracking the break-out of the services and protocol registries into separate packages. This package now depends on the findlib subpackage uri.services_full of Uri to contain a simple database of service names. It's not perfect but it makes the example zonefile work.