Commit graph

6 commits

Author SHA1 Message Date
Miek Gieben
8c8b37a30e middleware/metrics: export actual size (#448)
The `*_size*` metrics now export the actual packet length, not the
advertised one (although that might be nice as well).
2016-11-29 11:02:43 +00:00
Miek Gieben
aa7744dc86 cleanups: go vet/golint (#331)
Go vet and golint the new code once again.

Drop Name from NameTemplate - it's cleaner: nametemplate.Template.
2016-10-12 12:46:35 +01:00
Miek Gieben
560f11d148 EDNS0 unknown flags handling (#313)
Fix the unknown flags handling when receiving such message. We should
zero out all of the Z bits in the OPT record before returning.

Current behavior:

    dig +norec +noad +ednsflags=0x80 soa miek.nl @deb.atoom.net
    ...
    ; EDNS: version: 0, flags:; MBZ: 0080 , udp: 4096

New:

    dig +norec +noad +ednsflags=0x80 soa miek.nl @localhost -p 2053
    ...
    ; EDNS: version: 0, flags:; udp: 4096

Take care no to overwrite the Do bit.

We still accept *all* EDNS option; I do not consider that a bug in
itself.

Fixes #306
2016-10-02 17:23:25 +01:00
Miek Gieben
de0fa53379 Doc: add package docs (#296)
* Doc: add package docs

Add short package level docs to make godoc looks nicer.
Add some badges to the README.

* correct url
2016-09-25 08:39:20 +01:00
Miek Gieben
5301c5af5f Run golint and go vet (#276)
Cleanup the errors and removed deadcode along the way. The leaves
some error laying around, mostly about commenting exported identifier.
We should look hard if those really are needed.
2016-09-21 17:01:19 +01:00
Miek Gieben
d1f17fa7e0 Cleanup: put middleware helper functions in pkgs (#245)
Move all (almost all) Go files in middleware into their
own packages. This makes for better naming and discoverability.

Lot of changes elsewhere to make this change.

The middleware.State was renamed to request.Request which is better,
but still does not cover all use-cases. It was also moved out middleware
because it is used by `dnsserver` as well.

A pkg/dnsutil packages was added for shared, handy, dns util functions.

All normalize functions are now put in normalize.go
2016-09-07 11:10:16 +01:00
Renamed from middleware/state.go (Browse further)