Skip to content

Commit

Permalink
dnsforward/ipset: provide stub implementation for \!linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dsheets committed Oct 13, 2020
1 parent 722195d commit 5e489fb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions dnsforward/ipset_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// +build linux
// +build integration

package dnsforward
Expand Down
File renamed without changes.
25 changes: 25 additions & 0 deletions dnsforward/ipset_other.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// +build !linux

package dnsforward

import (
"github.com/AdguardTeam/golibs/log"
)

type ipsetCtx struct {}

// Convert configuration settings to an internal map and check ipsets
// DOMAIN[,DOMAIN].../IPSET1_NAME[,IPSET2_NAME]...
// config parameter may be nil
func (c *ipsetCtx) init(ipsetConfig []string, config *interface{}) error {
if len(ipsetConfig) != 0 {
log.Info("IPSET: ignoring %d ipset configuration lines; " +
"ipset support is only available on Linux",
len(ipsetConfig))
}
return nil
}

func (c *ipsetCtx) process(ctx *dnsContext) int {
return resultDone
}

0 comments on commit 5e489fb

Please sign in to comment.