Skip to content

Commit

Permalink
Added minor change for ignoring loopback check for nameservers (#297)
Browse files Browse the repository at this point in the history
Signed-off-by: Vedant <[email protected]>

Signed-off-by: Vedant <[email protected]>
Co-authored-by: Vedant <[email protected]>
  • Loading branch information
Jonsy13 and Vedant committed Aug 29, 2022
1 parent fbb00d4 commit ed7a37a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom/dns_interceptor/server/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"bufio"
"encoding/json"
"errors"
log "github.com/sirupsen/logrus"
"net"
"os"
"strings"

log "github.com/sirupsen/logrus"
)

// getInterceptorSettings generates the interceptor settings from the env
Expand Down Expand Up @@ -101,5 +102,5 @@ func updateResolvConf(resolvConfPath string, originalData *string) (string, erro

func checkValidUpstream(server string) bool {
serverIp := net.ParseIP(server)
return !serverIp.IsLoopback() && !net.IPv4zero.Equal(serverIp) && !net.IPv6zero.Equal(serverIp)
return !net.IPv4zero.Equal(serverIp) && !net.IPv6zero.Equal(serverIp)
}

0 comments on commit ed7a37a

Please sign in to comment.