Maint: upgrade qdm12 dependencies

- Upgrade qdm12/golibs
- Upgrade qdm12/dns to v1.11.0
This commit is contained in:
Quentin McGaw (laptop)
2021-07-24 17:59:22 +00:00
parent 7e343d7006
commit 3f1fb52fcb
11 changed files with 107 additions and 29 deletions

View File

@@ -15,9 +15,9 @@ var (
ErrIP6NotSupported = errors.New("ip6tables not supported")
)
func ip6tablesSupported(ctx context.Context, commander command.Commander) (supported bool) {
func ip6tablesSupported(ctx context.Context, runner command.Runner) (supported bool) {
cmd := exec.CommandContext(ctx, "ip6tables", "-L")
if _, err := commander.Run(cmd); err != nil {
if _, err := runner.Run(cmd); err != nil {
return false
}
return true
@@ -43,7 +43,7 @@ func (c *Config) runIP6tablesInstruction(ctx context.Context, instruction string
flags := strings.Fields(instruction)
cmd := exec.CommandContext(ctx, "ip6tables", flags...)
if output, err := c.commander.Run(cmd); err != nil {
if output, err := c.runner.Run(cmd); err != nil {
return fmt.Errorf("%w: \"ip6tables %s\": %s: %s", ErrIP6Tables, instruction, output, err)
}
return nil