Skip to content

Commit

Permalink
Update key generation for redis too
Browse files Browse the repository at this point in the history
  • Loading branch information
folbricht committed Aug 22, 2023
1 parent 3d3649b commit 5e07abb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cache-redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"strings"
"time"

Expand Down Expand Up @@ -125,6 +126,8 @@ func (b *redisBackend) keyFromQuery(q *dns.Msg) string {

edns0 := q.IsEdns0()
if edns0 != nil {
key.WriteString(fmt.Sprintf("%t", edns0.Do()))
key.WriteByte(':')
// See if we have a subnet option
for _, opt := range edns0.Option {
if subnet, ok := opt.(*dns.EDNS0_SUBNET); ok {
Expand Down

0 comments on commit 5e07abb

Please sign in to comment.