diff --git a/middleware/federation/federation.go b/middleware/federation/federation.go index 724dcb656..700b74685 100644 --- a/middleware/federation/federation.go +++ b/middleware/federation/federation.go @@ -118,7 +118,7 @@ func (f *Federation) Name() string { return "federation" } // label is always the 2nd to last once the zone is chopped of. For instance // "nginx.mynamespace.myfederation.svc.example.com" has "myfederation" as the federation label. // IsNameFederation returns a new qname with the federation label and the label itself or two -// emtpy strings if there wasn't a hit. +// empty strings if there wasn't a hit. func (f *Federation) isNameFederation(name, zone string) (string, string) { base, _ := dnsutil.TrimZone(name, zone) diff --git a/middleware/kubernetes/parse.go b/middleware/kubernetes/parse.go index f2a846552..bf8adfec3 100644 --- a/middleware/kubernetes/parse.go +++ b/middleware/kubernetes/parse.go @@ -74,7 +74,7 @@ func parseRequest(state request.Request) (r recordRequest, err error) { return r, nil } - // Becuase of ambiquity we check the labels left: 1: an endpoint. 2: port and protocol. + // Because of ambiquity we check the labels left: 1: an endpoint. 2: port and protocol. // Anything else is a query that is too long to answer and can safely be delegated to return an nxdomain. switch last { diff --git a/middleware/rewrite/edns0.go b/middleware/rewrite/edns0.go index 156d7c06c..0c983ff02 100644 --- a/middleware/rewrite/edns0.go +++ b/middleware/rewrite/edns0.go @@ -234,11 +234,11 @@ func (rule *edns0VariableRule) ruleData(w dns.ResponseWriter, r *dns.Msg) ([]byt return []byte(req.Proto()), nil case serverIP: - serverIp, _, err := net.SplitHostPort(w.LocalAddr().String()) + ip, _, err := net.SplitHostPort(w.LocalAddr().String()) if err != nil { - serverIp = w.RemoteAddr().String() + ip = w.RemoteAddr().String() } - return rule.ipToWire(rule.family(w.RemoteAddr()), serverIp) + return rule.ipToWire(rule.family(w.RemoteAddr()), ip) case serverPort: _, port, err := net.SplitHostPort(w.LocalAddr().String())