Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
szolin committed Sep 2, 2020
1 parent bdbd732 commit 28e1245
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dnsforward/ipset.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type ipsetCtx struct {
func (c *ipsetCtx) init(ipsetConfig []string) {
c.ipsetList = make(map[string][]string)
c.ipsetCache = make(map[[4]byte]bool)
c.ipset6Cache = make(map[[16]byte]bool)

for _, it := range ipsetConfig {
it = strings.TrimSpace(it)
Expand Down Expand Up @@ -117,8 +118,8 @@ func (c *ipsetCtx) process(ctx *dnsContext) int {
for _, name := range ipsetNames {
code, out, err := util.RunCommand("ipset", "add", name, ipStr)
if err != nil {
log.Info("%s", err)
return resultDone
log.Info("IPSET: %s(%s) -> %s: %s", host, ipStr, name, err)
continue
}
if code != 0 {
log.Info("IPSET: ipset add: code:%d output:'%s'", code, out)
Expand Down

0 comments on commit 28e1245

Please sign in to comment.